好的,这似乎解决了我的问题
Omar F Albacha (master +) asteroids $ git branch -d coins
warning: deleting branch 'coins' that has been merged to
'refs/remotes/origin/coins', but not yet merged to HEAD.
Deleted branch coins (was 354dfdd).
Omar F Albacha (master +) asteroids $ git branch --no-merged
easy-mode
Omar F Albacha (master +) asteroids $ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: game.js
Omar F Albacha (master +) asteroids $ git commit
[master 2449dd1] test
1 file changed, 1 insertion(+), 1 deletion(-)
Omar F Albacha (master) asteroids $ git merge master coins
merge: coins - not something we can merge
Did you mean this?
origin/coins
Omar F Albacha (master) asteroids $ git checkout coins
Switched to a new branch 'coins'
Branch coins set up to track remote branch coins from origin.
Omar F Albacha (coins) asteroids $ git branch
* coins
easy-mode
master
Omar F Albacha (coins) asteroids $ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Omar F Albacha (master) asteroids $ git branch
coins
easy-mode
* master
Omar F Albacha (master) asteroids $ git merge master coins
Auto-merging game.js
Merge made by the 'recursive' strategy.
game.js | 161 +++++++++++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 115 insertions(+), 46 deletions(-)
有一个关于清理过时分支的堆栈溢出指南。