Versions Compared

Key

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

...

  • -q , --quiet : Quiet, suppress feedback messages.
  • --progress : Progress status is reported on the standard error stream by default when it is attached to a terminal, unless --quiet is specified.
  • -f , --force :When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes.
  • -b <new_branch> : Create a new branch named <new_branch> and start it at <start_point>
  • -B <new_branch> : Creates the branch <new_branch> and start it at <start_point>; if it already exists, then reset it to <start_point>. This is equivalent to running "git branch" with "-f".
  • -t , --track  : When creating a new branch, set up "upstream" configuration.
  • --no-track : Do not set up "upstream" configuration, even if the branch.autoSetupMerge configuration variable is true.

Example

checks out the masterthe rdk-next branch.

$ git checkout masterrdk-next

add

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

...

$ git branch [branch]

Synopsis: 

git branch [--color[=<when>] | --no-color] [--show-current]
	[-v [--abbrev=<length> | --no-abbrev]]
	[--column[=<options>] | --no-column] [--sort=<key>]
	[(--merged | --no-merged) [<commit>]]
	[--contains [<commit]] [--no-contains [<commit>]]
	[--points-at <object>] [--format=<format>]
	[(-r | --remotes) | (-a | --all)]
	[--list] [<pattern>…​]
git branch [--track | --no-track] [-f] <branchname> [<start-point>]
git branch (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
git branch --unset-upstream [<branchname>]
git branch (-m | -M) [<oldbranch>] <newbranch>
git branch (-c | -C) [<oldbranch>] <newbranch>
git branch (-d | -D) [-r] <branchname>…​
git branch --edit-description [<branchname>]

...

  • -d , --delete : Delete a branch.
  • -D : Shortcut for --delete --force.
  • --create-reflog : Create the branch’s reflog. 
  • -f , --force :  Reset <branchname> to <startpoint>, even if <branchname> exists already. Without -f, git branch refuses to change an existing branch.
  • -m , --move :Move/rename a branch and the corresponding reflog.
  • -c ,--copy     :Copy a branch and the corresponding reflog.
  • -l , --list         :List branches. With optional <pattern>..., e.g. git branch --list 'maint-*', list only the branches that match the pattern(s).
  • -a , --all        :List both remote-tracking branches and local branches. Combine with --list to match optional pattern(s).
  • --show-current : print the name of the current branch. In detached HEAD state, nothing is printed.

merge

Merges [branch] into current branch.

...