我的工作在我的本地git倉庫的一些文件,並希望更改發送到從哪個地方是通過HTTPS克隆現有的遠程的Git倉庫。我知道你不會更新一個不是裸存儲庫,所以我創建了一個分支來推送這些更改。
這裏是我做了什麼,這是不工作:混帳推不更新遠程的Git倉庫
創建了git init
- 本地 git add -A // added all files
git commit -m "first commit"
git remote add origin [https://github.com/...]
git push -u origin master
這我明白,它推到github上 - 萬歲!
現在我想更新GitHub的倉庫。
首先我想你可能只是這樣做,以後git add *
& git commit -m "message"
,git push origin master
,但看完後this,我意識到你應該推到一個倉庫,是不是裸露。
所以,我創建了一個分支! git checkout -b new-branch
。
我遵循上述相同的設置,git add *
,git commit -m "message"
,git push origin new-branch
......「你的分支是最新的'origin/master'。」
太棒了!
所以,我想合併這些分支,我切換到主分支,並做一個git pull
,然後git push origin master
。
我收到每條最新的消息。但是當我檢查遠程回購時,沒有更新!
任何洞察力或建議將不勝感激。
編輯
git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: .bowerrc
new file: bower.json
modified: index.html
new file: public/vendor/jquery-1.11.3.min/.bower.json
new file: public/vendor/jquery-1.11.3.min/index.js
我已經更新了我的答案,關於'git status'。 – VonC