Home > Enterprise >  trying to commit/push a folder to github
trying to commit/push a folder to github

Time:10-22

I'm trying to commit an update to GitHub through gitbash, but it doesn't seem to work. The pictures below show

Changes done in the files, but gitbash says it's up to date:

1

My repository:

2

CodePudding user response:

You might want to push what you have added/committed locally.

So if you have changes in progress, as reported by git status, make sure to add/commit first, before pushing.

Check also, still with git status, that you are on a branch (and not a enter image description here

To commit files, you need to add/stage them first. Use git add filepath to stage single files. You can also do git add . to stage them all at once. Files file become green in your terminal.

Once staged, you can use git commit or git commit -m "message" as you have already done. Then, git push will work and update the remote.

  • Related