1

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

Christian
  • 4,902
  • 4
  • 24
  • 42
Phood
  • 21
  • 2

2 Answers2

0

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 detached HEAD), as that would explain the "up to date" error messsage.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Your terminal says

nothing added to commit but untracked files present

Untracked basically means that the file is unknown to git (yet).

enter image description here

The red color in your screenshot indicates non-staged files.

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.

When you run git status again, files appear in green in your terminal.

Learn more: https://github.com/git-guides/git-add

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.

Christian
  • 4,902
  • 4
  • 24
  • 42