GIT实用命令集合


#usually used GIT process command:

 

1.clone remote repository
 $ git clone http://***.git

 

2.confirm the branch history
 $ gitk&  $ gitk& filepath\filename

 

3.create a local repository 
$ git status 
$ git fetch --prune 
$ git branch -a 
$ git checkout -b mynewbranch

 

4.get your branch 
$ git checkout mybranch

 

5.commit your modify 
$ git status  $ git add. 
$ git commit 

 

enter the [i]key to modify the linux text,
then shift+insert,ESC,:wq to save your commit commend

 

6.push your branch to the remote 
$ git push -u origin mybranch
7.merge your branch to the release branch
$git checkout releasebranch 
$git fetch --prune  
$git rebase origin/relasebranch 
$git merge --no--ff mybranch

 

8.push the relasebranch
$git push origin releasebranch 

--------------------------------------------------- modify the old comment

①git rebase -i HEAD~2
②pick⇒edit。edit---Esc---:wq.
③git commit --amend

④git rebase --continue

你可能感兴趣的:(工作)