Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

add

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 pushedTo stage changes.Accepts arguments for files or directories within the project directory. Despite the name, git add doesn't just add files to the Git repository; it can also be used to stage file modifications and deletions.

$ git add log m/[codeline]..