Reputation: 53129
I have created a new repository on github:
I clicked button to sync it with my PC (Windows):
The .git
folder appeared somewhere else than I wanted (nobody asked me actually):
So, according to this answer, I cut the folder and pasted it wherever I wanted. Then I restarted the Github GUI. After playing around I discovered it doesn't work any more it did hlaf a year ago: It doesn't do anything but also doesn't tell you what's wrong. I just see this forever:
I really need to set this up, so I didn't give up and started the Powershell console instead. The console is also very funny, as every command takes more than 1 second to execute. But at least it communicates with me:
I navigated to the project folder:
C:\MYSELF\programing\unity\PROJECT_NAME [master]> git commit
On branch master
nothing to commit, working directory clean
This is confusing - I have no files uploaded, yet it claims that there's nothing to do. So I tried to configure the target for the repository and pasted this command:
git remote add origin https://github.com/USER_NAME/PROJECT_NAME.git
fatal: remote origin already exists.
Again, no success.
What should I do? Why is GitHub setup so comlicated? What am I missing to make it easy thing?
Upvotes: 0
Views: 1015
Reputation: 1053
Getting changes from your local directory into the remote repository involves three steps
git add <file>
git commit
git push
The message you are getting (nothing to commit) means that there are no staged changes (step 1).
Note that after step 2 the change will be in your local history but not in the remote repository. This is a common gotcha as the meaning of 'commit' deviates from the naming commonly used in tools like svn.
Upvotes: 1