简体   繁体   中英

After GIT commit, I did GIT push but the message said everything up-to-date

I'm new to Git. We're in Linux, and I just inherited someone's project family.

I recently did:

git add Bom.xml Bom.csv N.cpp makefile ../mm
git commit -a

(said On branch Bom, your branch is ahead of master by 2 commits. use git push to publish your local commits. Untracked files: list of things I don't want to commit anyway). Nothing added to commit but untracked files present.

then

git push

But it said everything up-to-date. I'm not sure where to look to see that my content is pushed up to my branch on the server. I know I had file changes since my last commit. It's a tough thing to search for the answer online. I looked at up-to-date too , and added the git add and the -a to my commit, but it still says up-to-date when I try to push.

Thanks! Mich

Like the link you mentioned , make sure you have added the file you want to commit into the staging area . Each time you want to commit

  • run git status to check.
  • And then run git add file to add file to staging area .
  • Run git status to check whether the file is added to the stage.
  • Then run git commit -m "some message" to commit
  • run git log to check your commit history check whether you have committed successfully
  • then check your remote branch by running git branch -a
  • if your remote branch doesn't have your local branch branch-name
  • then run git push origin branch-name to push your local branch to remote.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM