How to install own git server with ssh and http access by using gitolite and gitweb in CentOS

This is my take on this matter:

Quick links
At a glance, you should be able to see what a commit does. GitHub is a great way to make a barebones website for your package. I had the same issue when created new repositories. The terminal app you're using may or may not support changing which colors are displayed for given ANSI colors. BUGS Each time a superproject update removes a populated submodule e. If you create a new branch, add a submodule there, and then switch back to a branch without that submodule, you still have the submodule directory as an untracked directory:.

Your Answer

The most useful git commands

It also checks that the design is sound before code is written; the code review tool is not the place for high-level discussions. When planning work, please note that the Go project follows a six-month development cycle. The latter half of each cycle is a three-month feature freeze during which only bug fixes and documentation updates are accepted.

New contributions can be sent during a feature freeze, but they will not be merged until the freeze is over. Significant changes to the language, libraries, or tools must go through the change proposal process before they can be accepted. Sensitive security-related issues only!

First-time contributors that are already familiar with the GitHub flow are encouraged to use the same process for Go contributions. Even though Go maintainers use Gerrit for code review, a bot called Gopherbot has been created to sync GitHub pull requests to Gerrit. Open a pull request as you normally would. Gopherbot will create a corresponding Gerrit change and post a link to it on your GitHub pull request; updates to the pull request will also get reflected in the Gerrit change.

When somebody comments on the change, their comment will be also posted in your pull request, so you will get a notification. It is not possible to fully sync Gerrit and GitHub, at least at the moment, so we recommend learning Gerrit. It's different but powerful and familiarity with help you understand the flow. In addition to a recent Go installation, you need to have a local copy of the source checked out from the correct repository.

Either clone from go. Each Go change must be made in a separate branch, created from the master branch. You can use the normal git commands to create a branch and add changes to the staging area:. You can edit the commit description in your favorite editor as usual. The git codereview change command will automatically add a unique Change-Id line near the bottom. That line is used by Gerrit to match successive uploads of the same change. Do not edit or delete it. A Change-Id looks like this:.

The tool also checks that you've run go fmt over the source code, and that the commit message follows the suggested format. If you need to edit the files again, you can stage the new changes and re-run git codereview change: Make sure that you always keep a single commit in each branch.

If you add more commits by mistake, you can use git rebase to squash them together into a single one. You've written and tested your code , but before sending code out for review, run all the tests for the whole tree to make sure the changes don't break other packages or programs:.

To build under Windows use all. After running for a while and printing a lot of testing output, the command should finish by printing,. You can use make. See also the section on how to test your changes quickly. Once the change is ready and tested over the whole tree, send it for review. This is done with the mail sub-command which, despite its name, doesn't directly mail anything; it just sends the change to Gerrit:. Gerrit assigns your change a number and URL, which git codereview mail will print, something like:.

If you get an error instead, check the Troubleshooting mail errors section. If your change relates to an open GitHub issue and you have followed the suggested commit message format , the issue will be updated in a few minutes by a bot, linking your Gerrit change to it in the comments. Go maintainers will review your code on Gerrit, and you will get notifications via e-mail.

You can see the review on Gerrit and comment on them there. You can also reply using e-mail if you prefer. If you need to revise your change after the review, edit the files in the same branch you previously created, add them to the Git staging area, and then amend the commit with git codereview change:. If you don't need to change the commit description, just save and exit from the editor.

Remember not to touch the special Change-Id line. Again, make sure that you always keep a single commit in each branch. The first line of the change description is conventionally a short one-line summary of the change, prefixed by the primary affected package. The rest of the description elaborates and should provide context for the change and explain what it does. Write in complete sentences with correct punctuation, just like for your comments in Go. Add any relevant information, such as benchmark data if the change affects performance.

The benchcmp tool is conventionally used to format benchmark data for change descriptions. The special notation "Fixes " associates the change with issue in the Go issue tracker. When this change is eventually applied, the issue tracker will automatically mark the issue as fixed.

If the change is a partial step towards the resolution of the issue, uses the notation "Updates ". This will leave a comment in the issue linking back to the change in Gerrit, but it will not close the issue when the change is applied. If you are sending a change against a subrepository, you must use the fully-qualified syntax supported by GitHub to make sure the change is linked to the issue in the main repository, not the subrepository. All issues are tracked in the main repository's issue tracker.

This section explains the review process in detail and how to approach reviews after a change has been mailed. When a change is sent to Gerrit, it is usually triaged within a few days. A maintainer will have a look and provide some initial review that for first-time contributors usually focuses on basic cosmetics and common mistakes.

These include things like:. After an initial reading of your change, maintainers will trigger trybots, a cluster of servers that will run the full test suite on several different architectures. Most trybots complete in a few minutes, at which point a link will be posted in Gerrit where you can see the results. If the trybot run fails, follow the link and check the full logs of the platforms on which the tests failed.

Try to understand what broke, update your patch to fix it, and upload again. Maintainers will trigger a new trybot run to see if the problem was fixed. Sometimes, the tree can be broken on some platforms for a few hours; if the failure reported by the trybot doesn't seem related to your patch, go to the Build Dashboard and check if the same failure appears in other recent commits on the same platform. In this case, feel free to write a comment in Gerrit to mention that the failure is unrelated to your change, to help maintainers understand the situation.

The Go community values very thorough reviews. Think of each review comment like a ticket: After you update the change, go through the review comments and make sure to reply to every one.

You can click the "Done" button to reply indicating that you've implemented the reviewer's suggestion; otherwise, click on "Reply" and explain why you have not, or what you have done instead. It is perfectly normal for changes to go through several round of reviews, with one or more reviewers making new comments every time and then waiting for an updated change before reviewing again. This cycle happens even for experienced contributors, so don't be discouraged by it.

As they near a decision, reviewers will make a "vote" on your change. This is called "submitting the change". The two steps approving and submitting are separate because in some cases maintainers may want to approve it but not to submit it right away for instance, the tree could be temporarily frozen. This is my terminal variation, similar to many answers here.

I like to adjust the flags passed to less to prevent word wrapping. Did you try gitk or gitk --all? I suggest tig https: Although is was not designed with Git branches in mind, I was impressed by the results.

It also supports background colors, dashed lines, different shapes and more. There's a funky Git commit graph as one of the demos of the Raphael web graphics library. The demo is static, but it should be easy enough to take the code and swap out their static data for a live set of data -- I think it's just Git commit data in JSON format. The demo is here: I don't know about a direct tool, but maybe you can hack a script to export the data into dot format and render it with graphviz.

For OSX users, I've taken the gospes example and slightly modified it for gsed gnu-sed installed via homebrew and adjusted the colors to work with a black background, not sure how the original example could possibly render the way it does in the example since it specifies black text on a terminal with a black background. The key for OSX is to first install gnu sed which has the -r option. Most easily done with homebrew, which will not overwrite the system-installed sed, but will instead install gnu sed as "gsed".

Hope this helps SlippD. Thompson who commented above about OSX not working. In addition to the answer of 'Slipp D. Thompson', I propose you to add this alias to have the same decoration but in a single line by commit:. Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site the association bonus does not count. Would you like to answer one of these unanswered questions instead?

Pretty git branch graphs Ask Question. I have created a python script to create a graphiz graph! If you want high-quality and printable, my tool bit-booster. For more information, see my answer. Sylvie Davies Oct 13 '16 at Are you looking for a tool to visualize your own git history - or - a charting tool which has a way to draw pretty "Git branches"? Thompson 21k 3 32 Thompson Mar 21 '12 at 4: For me, the colors are changeable in the profile settings for my terminal app Terminal.

The terminal app you're using may or may not support changing which colors are displayed for given ANSI colors. Also, the dash em dash, accurately was created with option-shift-[hyphen-minus key]. I suppose I wrongly assumed that all current platforms were up-to-snuff with Unicode. Thompson May 5 '13 at Motlin Feb 24 '16 at Many of the answers here are great, but for those that just wants a simple one line to the point answer without having to setup aliases or anything extra, here it is: Ivan 3, 9 22 For textual output you can try: I can see no date shown in the log.

Test it with JSFiddle. Yay, that's totally amazing! Posted it into fiddle jsfiddle. The arrows should point to parent s , though, not to children. That's a common hurdle for people trying to understand Git: Making it clear that nearly everything in git is relative to something prior helps all the other pieces fall into place.

Thompson Mar 2 '15 at Regarding arrow direction, from the docs: FYI, after seeing this post and playing with gitgraph. It's not finished, and the UI isn't where I want it to be yet, but contributions are welcome!

How can I do a bugfix on master and integrate it into my less stable branch es? How does git commit --amend work, exactly? What is the difference between merging master into branch and merging branch into master? Git rebase --preserve-merges fails Here is an example of such a graph demonstrating the effects of a simple rebase: I would also like a few line on how to use it: How to produce a graph from scratch?

I will look into it and expand the wiki when I have more time Feel free to promote the package: This is great stuff! I'll write up a tutorial at some point, but for now, I just wanted to mention that you can post-process your graphs using the documentclass standalone I use the crop feature , use latex input.

Converting from the SVG to a raster format like PNG is easy enough with convert -antialias -density -background none input. By the way, these images look amazing with full transparency. Still working on the font issue It took me a while to get this working so I wrote a step-by-step guide how to get gitdags working from scratch on Ubuntu The documentation for gitdags is on the way!

It works fine with large repositories and complex dependency graphs. Sample screenshots, showing the linux-git and linux L 6, 8 38 Tomasz Wasiluk 13 4. It is also available in App Store, so update should work automatically. I love sourcetree's graph, but i'd rather use the command line, and sourcetree's defaults always mess with my repos. SourceTree would insist you create Atlassian account or use your google account and grant Atlassian some permissions to get your email and profile info , and after install on Mac OS X El Capitan v Very obscure messages, not so great.

And then after uninstall don't forget to tidy up your Google security privileges you granted earlier: And provide a jQuery plugin which make it easy to use.

Wilq 1, 3 23 Harry Lee 8 7. Looks nice, how do you get preformatted data to draw this graph? Olga I just add the backend code to my repo. You can view it on github. These are some of the things I love about this script: It uses unicode characters to draw the lines in the graph giving a more continuous look to the graph lines. You can combine --reverse with the graph output, which is not possible with the regular git log command.

It uses git log internally to grab the list of commits, so all options that you pass to git log can also be passed to this script as well. I have an alias using git-forest as follows: Running git under cygwin with the required perl modules installed might be the best alternative you could get if you really want this on Windows: Wow, that repo has a lot of great tools.

I like the graphical prompt indicator things. Jan 25 at Here's a snippet of the graph it generates for jquery: I tried this, but couldn't get dot to work correctly with the output for our repo 42 branches, tags, That's exactly what I was looking for! I use gitx which makes pictures like this one: Dustin 66k 17 98 I'd have sworn I heard you say "way octopus merge"!

Out of curiosity, has anyone attempted to extract GitX's or another GUI git tool's drawing routines into a standalone executable? Thompson Oct 18 '12 at It was on S3 via skitch before they redid their thing.

I wish I still had it.

RStudio, Git and GitHub