Git Intro - Git Usage

 

1. git checkout remote branch

1.1 git clone git@192.168.5.38:AppEngine.git myengine

1.2 git fetch

1.3 git branch -b mybranch origin/somebranch

1.4 git fetch

1.5 git pull

 

2. submit codes

notes: both modify and new-add files need submit to remote by "git add filename"

2.1 modify codes

2.2 add files

git add localdir/test1.cpp

git add localdir/test2.cpp

git add localdir/test3.cpp

git commit -m "log"

git push

 

3. reset local modify (solve conflict)

git reset --hard FETCH_HEAD

git pull

posted on 2017-12-01 14:03  fanbird2008  阅读(68)  评论(0)    收藏  举报

导航