Skip to content

Tool - Git - commands overview

Just a quick overview about some git commands

  • git init | creates a repository in the current directory
  • git branche $mybranch | creates the branch $myBranch
  • git add $file | adds a file to the index/staging
  • git status | shows the status of the current branch
  • git diff [$file | $directory | $branchname | $commitId] | displays the diff between the current and the wished $item
  • git checkout $branch | switch to branch $branch
  • git checkout -b $branch | creates the branch $branch from the current branch and switch to branch $branch
  • git merge $branch | merge current branch with $branch
  • git log | shows the log
  • git hist | shows the history
  • git commit | commit the changes from the index to the repository
  • git commit -a | adds the modified $items to the index and commit to the repository
  • git rebase -i master | there you can squash commits
  • git remote add $uri | adds the source $uri to your git
  • git pull | fetch and merge from remote into current branch
  • git-achievements | super secret cool stuff ;-)

A greate introduction into the git concept can be seen here

gitready.com

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Markdown format allowed
Form options