yvi (
yvi) wrote in
dw_dev_training2012-09-02 07:29 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[site community profile]](https://www.dreamwidth.org/img/comm_staff.png)
More git newbie questions
So I managed to submit my first pull request \o/
However, i have the following problem, bets described in console output:
What's going on there?
However, i have the following problem, bets described in console output:
dh-yvi@newhack:~/dw$ git checkout develop
Switched to branch 'develop'
Your branch is ahead of 'dreamwidth/develop' by 68 commits.
dh-yvi@newhack:~/dw$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'dreamwidth/master' by 200 commits.
dh-yvi@newhack:~/dw$ git pull dreamwidth develop:develop
Already up-to-date.
dh-yvi@newhack:~/dw$ git pull dreamwidth master:master
From https://github.com/dreamwidth/dw-free
! [rejected] master -> master (non-fast-forward)
dh-yvi@newhack:~/dw$ git push origin develop
Everything up-to-date
dh-yvi@newhack:~/dw$ git push origin master
Everything up-to-date
What's going on there?
no subject
no subject
git diff shows up empty on both branches.
no subject
no subject
git checkout master
git log
is that correct?
master:
commit 189bcec4fc851764e4324cfab6300a7bd2e087cd
Merge: 2cfdd78 7d70ccc
Author: Afuna <afunamatata+github@gmail.com>
Date: Fri Aug 31 01:13:15 2012 -0700
Merge pull request #35 from ninetyd/bug4606/moderated_entry
Bug 4606. Include adult content reason on moderated entry.
develop:
commit 189bcec4fc851764e4324cfab6300a7bd2e087cd
Merge: 2cfdd78 7d70ccc
Author: Afuna <afunamatata+github@gmail.com>
Date: Fri Aug 31 01:13:15 2012 -0700
Merge pull request #35 from ninetyd/bug4606/moderated_entry
Bug 4606. Include adult content reason on moderated entry.
no subject
Can you show me your remotes?
git remote show origin
git remote show dreamwidth
no subject
dh-yvi@newhack:~/dw$ git diff
dh-yvi@newhack:~/dw$ git remote show origin
* remote origin
Fetch URL: https://yvi-dw@github.com/yvi-dw/dw-free.git
Push URL: https://yvi-dw@github.com/yvi-dw/dw-free.git
HEAD branch (remote HEAD is ambiguous, may be one of the following):
develop
master
Remote branches:
Bug4577/commprofile tracked
develop tracked
master tracked
Local refs configured for 'git push':
Bug4577/commprofile pushes to Bug4577/commprofile (up to date)
develop pushes to develop (up to date)
master pushes to master (up to date)
dh-yvi@newhack:~/dw$ git remote show dreamwidth
* remote dreamwidth
Fetch URL: https://github.com/dreamwidth/dw-free
Push URL: https://github.com/dreamwidth/dw-free
HEAD branch: develop
Remote branches:
develop tracked
master tracked
Local branches configured for 'git pull':
develop merges with remote develop
master merges with remote master
Local refs configured for 'git push':
develop pushes to develop (up to date)
master pushes to master (fast-forwardable)
no subject
The master branch is unused, generally speaking. We haven't been keeping up with it, so the last time master was updated was in May, with commit 1bd5c854b8ce2602cb032eba199202a6fe8b7b90.
However, it looks like somehow your master branch received the commits from develop. Perhaps from a pull from develop at some point. So on your local master, you now have a bunch of commits that master doesn't -- hence, you're 200 commits ahead of it.
This generally doesn't matter, since we never use master. The only thing that matters is develop, and from what I can tell, your develop branch seems fine. It only errored when you were working on the master branch.
So -- I'd suggest ignoring master and just using develop, since that's all we use anyway. Then you should be fine?
Edit: to fix this, you can do the following which destroys your master branch and replaces it with the one from dreamwidth:
git checkout master
git fetch dreamwidth
git reset --hard dreamwidth/master
no subject
Thank you!