Welcome to the Treehouse Community
Looking to learn something new?
troy beckett12,035 Points
pushing and pulling with git??
I'm currently trying to learn git and finding it a bit difficult. I went onto github and created a repo. I used my computer to create some work to push to my github repo. I found the commands and thought it would work easy.
However when I made the repo on github I also put a readme.txt with it. So when I try to push to the remote repo, git won't do it because it doesn't have that readme.txt on my local computer.
The hint it gives is 'maybe pull first'. How do I solve this problem. I know I could obviously make a new repo with no readme.txt but I'm interested in possibly figuring this out. As I think it will help me learn quicker.
You'll need to 'pull' the readme file from the remote git repo so that it is available locally. I don't think you can commit a local repo (on the same branch) that is behind the remote one. So, get them aligned first, then you should be good to go.
What IDE are you using for this? What commands are you using on your machine that git is not liking?
Also, have a look at this post from yesterday that might give you some ideas.
Google gave me this which looks good ... combining
git fetch and
git merge sounds like what you want to do. That's, effectiely, what
git pull does; you just need to stipulate where to pull it from and to - that's the