0

Command line tools

Download git command line tools for Windows: http://msysgit.github.io/

Command line tips

Create a branch and switch to it

Switch branches

Listing Branches

Remove references to non-existent remote branches

Push to remote repo

Merging branches

Be sure to commit and push branch to remote repo first for completeness

Delete local branch

Delete remote branch

Undo a branch merge

Sync all remote branches

If that fails, do it one-by-one manually:

Saving Credentials

Cloning a Remote Git Repo

Cloning from SVN with Commit History

Remember to add a .gitignore file

Reverting the current repo back to a previous commit

(reset without –hard only resets the history. –hard also resets the files)

Reverting a single file from a known specific commit

Reverting a specified single file or all files in the path back to the last commit

To revert ALL uncommitted changes:

Saving credentials (I have only needed this on Windows)

GitHub.com CheatSheet

https://education.github.com/git-cheat-sheet-education.pdf

 

See also:
0