Git tips


1.git rebase develop
Current Branch: master;
Other Branchdevelop;
Beginning base point both master and developBase_Node
Other Branch develop's last committed point: developLastPoint
What does it mean to "git rebase develop" runs when the current branch is master?
Hi, Git. I'm master branch. Please rebuild me base on develop.
My beginning point will be developLastPoint of the branch develop.

2. git merge develop
Current Branch: master;
Other Branchdevelop;
Means:
Hi, Git. I'm master branch. Please make  a combination of differents of the branch develop and append it into my branch.

3. workflow
3.1 git init -> git add -> git commit
3.2 git init -> git commit -a  (equals git add -> git commit)

git init: Hi git, please handle current folder.
git add: Hi git, please add some files into staging area.

4.branch
git branch
git branch new_branch_name
git branch -d will_be_deleted_branch_name
git branch -D Must_be_deleted_branch_name
git checkout current_branch_name

5. watching
git diff
git diff --cached
git status
git show, git ls-tree,git cat-file
gitk
http://gitbook.liuhui998.com/3_4.html
$ git log v2.5..        # commits since (not reachable from) v2.5
$ git log -p 
$ git log --stat
   
 

6.object
Blob, Tree, Commit, Tag

7. undo
$ git reset --hard HEAD
$ git reset --hard ORIG_HEAD

8. Rebase
git rebase -i head~3
> s        # select 's'
:wq
git push

9.get merge dev; conflict: git add again; git commit;
10.git diff --shortstat "@{0 day ago}"


评论

此博客中的热门博文

XML, XSL, HTML

Input in element.eleme.io

Data URI是由RFC 2397 ACE