user10444434
user10444434

Reputation:

Can't commit in Git. Your branch is up to date with 'origin/master'

I am really new to Git, and I faced this problem
So first i downloaded the zip from the Github, then i modified it, added my code etc. and tried to upload it(add,commit,push). I got the error like: No github repository detected. I did git init and upload it, but i could upload it to the fork that i forked from my team's repo. but i need to upload my files into the team's repo, not to the one that i forked

How could i fix this?

Upvotes: 0

Views: 16548

Answers (2)

i-akmalov
i-akmalov

Reputation: 11

Just change something, for example add some comments or delete free space then try:

git add .
git commit -m "make it better"

git sees this as a new project

Upvotes: 1

Illia
Illia

Reputation: 367

git add .

command will track or stage all the modified files.

git commit -m "comment"

Will commit staged files to the repository.

Looks like it is really nothing to commit, because nothing was staged. All the changes is really up to date.

You can use

git status 

to check if there is something to commit

and also advice to not use

git add .

but specify file by file,

git add src/fileName.cs

because git doesn't work well with blobs. There is no well done history tracking for the blob (while logically it is correct). Once you added blob all the next modifications will be tracked as new file

Upvotes: 3

Related Questions