You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Provide details about Repo & Git commands

Git Command Referrence

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

checkout

To switch to another branch in your local work environment.

$ git checkout BRANCH_NAME

add

To stage changes[file modifications and deletions].Accepts arguments for files or directories within the project directory. 

$ git add

commit

Consists of a snapshot of the directory structure and file contents for the entire project.

$ git commit

branch

To view a list of existing branches

$ git branch

Creates a new topic branch

$ git branch [branch]

merge

Merges [branch] into current branch.

$ git merge [branch]

diff

Shows diff of the unstaged changes.

$ git diff

Shows diff of the staged changes.

$ git diff --cached

log

Shows the history of the current branch.

$ git log

Shows the commits that aren't pushed.

$ git log m/[codeline]..


  • No labels