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
git status
to check. git add file
to add file to staging area
. git status
to check whether the file is added to the stage. git commit -m "some message"
to commit git log
to check your commit history check whether you have committed successfully git branch -a
branch-name
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.