Difference between revisions of "Git cheatsheet"

From PC2wiki
Jump to: navigation, search
(initial stub)
 
m (added sections)
Line 1: Line 1:
 
This article is a collection of shortcuts and other helpful information about using git.
 
This article is a collection of shortcuts and other helpful information about using git.
 +
 +
==git cli==
 +
git Command-line interface commands
  
 
Find all changes between workspace (gitspeak: working tree)
 
Find all changes between workspace (gitspeak: working tree)
Line 23: Line 26:
 
List all tags
 
List all tags
 
  git tag
 
  git tag
 +
 +
==EGit==
 +
eclipse EGit plugin
 +
 +
For each cli item describe how EGit does the same operation
 +
 +
==todo==
 
   
 
   
 
[[TBD]] summarize: git pick, git rebase, git squash, cherry-pick
 
[[TBD]] summarize: git pick, git rebase, git squash, cherry-pick

Revision as of 12:02, 24 January 2014

This article is a collection of shortcuts and other helpful information about using git.

git cli

git Command-line interface commands

Find all changes between workspace (gitspeak: working tree)

git status

Create branch foobar

git branch -b foobar

Create and switch to foobar

git checkout -b foobar

Switch to branch foobar

git checkout foobar

Switch back to master

git checkout master

List branches

git branch

Create a label footag for current revision (gitspeak: tag)

git tag footag

Label a previous version (foo.c commit 085398a)

$ git log --oneline foo.c
046d45e First working version
085398a First commit
$ git tag footag 085398a 

List all tags

git tag

EGit

eclipse EGit plugin

For each cli item describe how EGit does the same operation

todo

TBD summarize: git pick, git rebase, git squash, cherry-pick