Git Cheatsheet
ndpsoftware.com
ndpsoftware.com
"How can I marge this branch to master?"
"Just check the man pages."
"But what am I looking fo-"
"Man pages."
This is all something that people can get used to, but the problem spills over from CLI into GUIs, because GUI authors try to make their programs more newbie-friendly and use more sane command names and lingo. As a result, no two GUIs will use exactly the same names for the same actions.
So imagine a newcomer to git, who starts using a GUI and gets used to its lingo. Unfortunately, that newcomer can't easily communicate with other people who use other GUIs or CLIs. Worse, sooner or later the newcomer will have to resort to using the CLI or a combination of different GUIs, because there's always some useful git feature that you either can't do in the GUI or is an order of magnitude easier to do from the command line.
That, in my not-so-humble opinion, is the worst problem with git. To me, this is sort of tragicomic, because git is absolutely the best VCS I've ever used.
If you think about it -- targeting new users is not the ideal for a maker-centric tool. A master chef uses the sharpest knife around. The new chef is only new for so long before he graduates up.
I try to link to the relevant StackOverflow explanation-
I'm adding new stuff every now and then. This weekend I'll organize it and add some obvious stuff that is missing and publish it to HN.
I honestly find it more useful that most of the cheat sheets, specially those images with a couple of commands written on it.
Please feel free to collaborate pull requests and or issues are greatly appreciated.
... and has a Mac, of course, which rules it out for many of us (though I can't speak for the sdfjkl).
There's also the hg-git option, may work well enough for you.
This is breaking the point of the back button and URL. If you click through a long Wiki page you'll see presing back does indeed move you back.
Back is broken it just isn't hijacked.
git fetch remotename
git merge remotename/master
But you usually just want to rebase your changes onto the latest HEAD: git fetch remotename
git rebase remotename/master
Merging will place the remote branch's changes after yours, which will make your history a nightmare, especially if you're going to continue working on your branch. Rebasing will place your local branch changes after the latest changes to the main branch.A "git fetch <remote>" would then update the remote tracking branches.
Now to your specific question (fast-forward a local branch without checking it out), you can
git fetch origin master:master
or git push . origin/master:master
Then you can merge 'master' instead of 'origin/master', thus eliminating the remote URL or "remote-tracking" language from the prepared commit message.[1] http://gitster.livejournal.com/42247.html
[2] http://lwn.net/Articles/328436/
[3] http://yarchive.net/comp/linux/git_merges_from_upstream.html
Site seems down. Just clone this repo and open git-cheatsheet.html in your browser.
If the author has not labelled it opensource, should you be cloning it's source code (unless of course, you're the author)?
</strike>
Edit: Sorry, just researched it, you're linking the repo from the author's git account.
You can set custom hotkeys in your tigrc (which are context sensitive). For example:
bind generic F !git fetch
bind main ! !git revert %(commit)
bind main c !git checkout %(commit)
[1]http://jonas.nitro.dk/tig/The visualization is great and a lot of fun but I would also like to have a non-interactive version for quick paper-based reference.
In case you don't know this humorous tale, read and enjoy the part about `git checkout` http://stevelosh.com/blog/2013/04/git-koans/