- git add -u to add all modified files in the index.
- git checkout -f to trash all uncommitted changes. Useful before pulling.
- git stash as an alternative to above.
- git diff --cached to see the added changes.
- git rebase to squash multiple commits into a commit before pushing. Rebasing is useful for other stuff, but that needs more exploration. git rebase -i origin/master to merge all unpushed commits.
- git commit --amend might be an alternative for that as well.
- See here for some other tips.
Sunday, November 01, 2009
Some Git Tips
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment