-3

I have a branch tracking to remote repository. (the remote repository is a forked version of the origin) It has local commits while when I try to git push, it shows "Everything up-to-date".
Is there anything wrong?
Thanks!

Here's my workflow:

git remote add kai_fork git@192.168.200.1:kai_wang/my_project.git
git remote update
git checkout -b k-dev kai_fork/backend_dev
... (edit and git commit to local kai_dev branch)

enter image description here

git remote show kai_fork

partial results: enter image description here

kai
  • 1,141
  • 3
  • 15
  • 25
  • 1
    Per `git help push`, `-n` means "Do everything except actually send the updates." – wjandrea Mar 14 '20 at 02:50
  • @wjandrea, yes I know -n means dry run. if something "could" be push, the message will be different from "Everything up-to-date". -n option won't affect the result message. – kai Mar 15 '20 at 11:25
  • Oh, I see. Voting to reopen. But why are you using `-n` in the first place? Also please put the output in the question as text - helps with readability, copy-pasting, etc. – wjandrea Mar 17 '20 at 19:51
  • Check out [git push says “everything up-to-date” even though I have local changes](https://stackoverflow.com/q/999907/4518341). There are lots of different answers. – wjandrea Mar 17 '20 at 20:12
  • 1
    Thanks @wjandrea, the link really helps. In my case I have to use "git push kai_fork k-dev:backend_dev". – kai Mar 19 '20 at 08:13

1 Answers1

1

Just try to run this command to push,

git push

And for checking the status of the remote. Try this,

git status
Anurodh Singh
  • 814
  • 5
  • 9
  • The result of "git push" is the same as "git push -n" => "Everything up-to-date". – kai Mar 15 '20 at 11:27
  • And the result of "git status" is: On branch k-dev Your branch is ahead of 'kai_fork/backend_dev' by 3 commits. (use "git push" to publish your local commits) nothing to commit, working tree clean – kai Mar 15 '20 at 11:27