Skip to content
Doug Hagan edited this page Jun 9, 2017 · 9 revisions

Commonly Used Actions

Fetch

Download all branches and changes from the remote repository, and remove orphaned local branches.

> git fetch -p

Pull

Update the current local branch with remote changes.

> git pull

Create Branch

Create a new local branch.

> git checkout -b <branch_name>

Commit

Commit local changes to a local branch.

> git commit

Enter a descriptive comment.

Push Branch

Upload changes on a local branch to the remote repository.

> git push origin <branch_name>

Tag

Create a marker on the current local branch.

> git tag <tag_name>

Push Tags

Upload markers on all local branches to the remote repository.

> git push origin --tags

Clone this wiki locally