I'm new to using git. I tried doing git push origin develop
and the terminal says everything is up to date. I tried git diff --stat origin/develop
and the terminal displays:
tpl/view/css/layout.css | 7 ++++---
tpl/view/ctrl.time-sheet-item.tpl | 10 +++++-----
tpl/view/ctrl.time-sheet.tpl | 7 +++----
3 files changed, 12 insertions(+), 12 deletions(-)
So to me, it looks like there should still be files to push. I went to my friend's computer and did a git pull origin develop
, and it didn't receive the new changes to the three files I mentioned above. How do I push my changes to the develop branch and receive them on another computer?
Based off your comment the issue is (probably) that you branched repeatedly. (so like bar/develop, foo/bar/develop/ blah/foo/bar/develop, etc).
The reason your rebase is shooting you down is that you can't rebase to a branch that doesn't contain the initial commit you branched from ( fatal: Needed a single revision)
Do the following:
git status
This will print your current branch. (Lets assume its blah/foo/bar/develop)
From here you have to options.
Option 1) Simpler, might not work if one of the intermediate steps has changed and you want things from it:
git checkout develop
git fetch
git rebase origin/develop
git merge origin/blah/foo/bar/develop
Option 2) Will work but could be very timeconsuming
git fetch
git rebase origin/foo/bar/develop
git push origin foo/bar/develop
git checkout foo/bar/develop
git rebase origin/bar/develop
git push origin bar/develop
git checkout bar/develop
git rebase origin/develop
I would probably try option 1 and only fall back to option 2 if option 1 doesn't work In either case, solve the merge conflicts if any and you're done:
git commit -a
git push origin develop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With