Howto

How to undo/revert your last commit

git reset --soft HEAD^

How to tell which files git is tracking

git ls-files

How to get the short sha1 for a commit

git log --oneline

See also http://stackoverflow.com/questions/2405305/git-how-to-tell-if-a-file-is-git-tracked-by-shell-exit-code

How to use git stash

Undo your changes, show your stashes, and re-apply them

git stash
git stash list
git stash apply

http://git-scm.com/book/en/Git-Tools-Stashing

Fix your email address in your commits

https://help.github.com/articles/changing-author-info

http://stackoverflow.com/questions/750172/how-do-i-change-the-author-of-a-commit-in-git

http://git-scm.com/docs/git-rebase#_recovering_from_upstream_rebase

http://serverfault.com/questions/12373/how-do-i-edit-gits-history-to-correct-an-incorrect-email-address-name

Use git submodules

Once your submodules are all set...

git submodule init
git submodule update

http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/

Remove a git submodule

To remove a submodule you need to:

  1. Delete the relevant line from the ''.gitmodules'' file.
  2. Delete the relevant section from ''.git/config''.
  3. Run ''git rm --cached path_to_submodule'' (no trailing slash).
  4. Commit the superproject.
  5. Delete the now untracked submodule files.

-- https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial

Learning git

http://pcottle.github.io/learnGitBranching/?NODEMO

http://think-like-a-git.net

http://try.github.io/levels/1/challenges/1

https://github.com/gazler/githug

fast forward

http://nathaniel.themccallums.org/2010/10/18/using-git-fast-forward-merging-to-keep-branches-in-sync/

http://365git.tumblr.com/post/504140728/fast-forward-merge


Home | About | Sitemap | Recent changes | © Philip Durbin | @philipdurbin | philipdurbin@gmail.com