Find out about any command. For example, git help commit
.
Take the current folder, and turn it into a Git repo. (For when you're starting something new.)
git clone http://some/repo/foobar
Clone an existing repo to your local machine.
Will create the folder for you, based on the last part of the path. (In this case, foobar
.)
What branch am I currently on?
What changes do I have staged?
What changes are there in my working copy, but not yet staged?
Stage foo.txt
Stage all the changes that are pending in my working copy
Commit your staged changes.
Stage all of the tracked files (but not new ones) in my working copy that have changes, then commit them all.
Show the commit history (most recent first).
Note: when you run this, you're likely to have more than a screen's worth of content so Git will kick in vi as a pager. You'll know this because instead of returning to a new command line, your line will start with just :
. You can keep hitting space to scroll down until you run out of content and get back to a command line, or just hit q
to quit the pager.
Create a new local branch called my-feature
, then switch to it.
Push the current branch to your default remote.
Pull the latest changes for this branch from your default remote, and automatically do a recursive merge if required.
Pull the latest changes for this branch from your default remote, and then try and rebase your work on top of them.
(Don't do this if you have any local commits)
Show all the local branches
Trigger a basic Windows browser.