Problem with git

Total git-noob here, and are trying to us PyCharm to push a project to github.
I have committed changes, but when i push it out nothing happens. And when i try "Update project" i get this message:

Can't update: no tracked branch
No tracked branch configured for branch master.
To make your branch track a remote branch call, for example,
git branch –set-upstream master origin/master

I have tried to use this command in terminal, and searched all over the net to try to understand this to no avail.
Any help and clarification greatly appreciated!
15 comments
Comment actions Permalink
How did you initially create your Git repository?
0
Comment actions Permalink
I have tried these methods.

  • tried creating a repository on github first, then connect my project to it and push it out. wont upload.
  • tried to share the project to a new github repository. the project is created, but no files are uploaded.

in both cases i tried every buttons i could think would be related and do what i want.
0
Comment actions Permalink
What do you mean by "connect your project to it"? If you create a repository on github first, you need to check it out to a new directory, then put your project files into that directory, add them to git, commit and push.

If you use "Share on GitHub", you need to add the files and push them manually after you do that. Open the Changes view (VCS | Show Changes View...), add the unversioned files to Git, commit and then push.
1
Comment actions Permalink
okay. i did as you said (share on GitHub). I added to git, committed and pushed. But now i only get "nothing to push".
i then changed a file in my project, added to git, committed and pushed. same result.
0
Comment actions Permalink
Could you please attach your .git/config file and a screenshot of the "Push" dialog?
0
Comment actions Permalink
Please try replacing .git/config with the file I've attached.
config (378B)
0
Comment actions Permalink
same problem.

i also tried changing a file, commit it and push only that file. i still get "nothing to push"
0
Comment actions Permalink
Do you still get the same error on Update Project ("no tracked branch...") even with new config file?
0
Comment actions Permalink
after i changed the config-file i get a new error on Update Project:

Can't update: tracked branch doesn't exist.
Tracked branch master doesn't exist.
The branch will be automatically created when you push to it.
0
Comment actions Permalink
Please invoke Git -> Push and select the checkbox below: "Push to alternative branch".
It should be autofilled with "master".
Then press Push and see if that helps.
0
Comment actions Permalink
nothing happens. i get a window asking for my login credentials, it says pusing on the bottom bar of pycharm, then nothing.
no updates in the log, and no new files on github.
0
Comment actions Permalink
What happens if you push from the command line?
Call `git push -u origin master` and see what happens there.
0
Comment actions Permalink
Well, it looks like you have something wrong in Git setup, since it doesn't work from the command line.
You may want to start from scratch and carefully follow, for example, GitHub instructions:
https://help.github.com/articles/set-up-git
https://help.github.com/articles/create-a-repo
0

Please sign in to leave a comment.