Git 關聯遠端庫

weixin_34162695發表於2017-03-05

git idea /wstorm 衝突解決

Conflict resolve

git 遠端庫關聯

刪除origin

git remote -v


➜  jersey-mybaties-I git:(master) git remote -v

origin  git@github.com:tws-demo/jersey-mybaties-I.git (fetch)

origin  git@github.com:tws-demo/jersey-mybaties-I.git (push)

➜  jersey-mybaties-I git:(master) git remote remove origin

➜  jersey-mybaties-I git:(master) git remote -v           

➜  jersey-mybaties-I git:(master) 

提交到新庫

create a new repository on the command line




echo "# 101-jersey-web" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:YingjiaZhang/101-jersey-web.git
git push -u origin master


push an existing repository from the command line


git remote add origin git@github.com:YingjiaZhang/101-jersey-web.git
git push -u origin master

➜  jersey-mybaties-I git:(master) gst

On branch master

Your branch is up-to-date with 'origin/master'.

You are currently rebasing branch 'master' on '117df5f'.

  (all conflicts fixed: run "git rebase --continue")



nothing to commit, working directory clean


➜  jersey-mybaties-I git:(master) git rebase --continue

Applying: Basic question one

No changes - did you forget to use 'git add'?

If there is nothing left to stage, chances are that something else

already introduced the same changes; you might want to skip this patch.



When you have resolved this problem, run "git rebase --continue".

If you prefer to skip this patch, run "git rebase --skip" instead.

To check out the original branch and stop rebasing, run "git rebase --abort".

Ifworkspace cleanbut untillshow rebasethen rebase --skip

相關文章