Page History
...
Additional Handy Git Commands
git status
- At any time, you may use this command to determine the status of your local git repository and how many commits ahead or behind it may be from the "origin" repository at GitHub. It also tells you if you have local changes that you haven't yet committed. For more info type:git help status
git log
- At any time, you may use this command to see a log of recent commits you've made to the current branch. For more info type:git help log
git diff
- At any time, you may use this command to see differences of your current in progress work. For more info type:git help diff
git pull
- Can be used instead of usinggit fetch
followed bygit merge
. A "pull" does both a fetch and an automated "merge" in a single step.git stash
(See also: Stashing) - Allows you to temporarily "stash" uncommitted changes. This command is extremely useful if you want to do a "pull" or "merge" but were working on something else. You can temporarily "stash" what you are working on to perform the merge/pull, and then usegit stash apply
to reapply your stashed work.git rebase
(See also: Rebasing) - This tool is extremely powerful, and can be used to reorganize or combine commits that have been made on a local branch. It can also be used in place of a "merge" (in any of the situations described above). However, as it changes your commit history, you should NEVER USE REBASE ON ANY BRANCH THAT HAS BEEN PUBLICLY SHARED ON GITHUB. For more information, see Pro-Git's chapter on Rebasing and GitHub's 'rebase' page.
...
Overview
Content Tools