Search code examples
gitgithubgitlabgit-remote

Update remote repository git


I am trying to pushed my code on gitlab existing repository I have pushed in it just few days before and noe I have modified some folders and files in my local repository and when I commit and push my code to my remote repo it is showing After commit -> NO changes added to commit and after push -> Everything is up to date

And when I look into remote repo , nothing is updates, it is showing my old code there.. I think this is because I update my local repository with some folders and files anyone here has an idea what could be the problem?


Solution

  • I tried as per alert in git bash that git commmit -a -m "mymessage" then only the existing files got updated , not the new folder and files ..how can I update the new remaining folder??

    From this comment I believe you are running git commit incorrectly... git commit -a does not commit untracked files. If you're creating new files, you need to explicitly add them using git add <file>

    From the commit help pages:

    -a, --all Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.