[Tutor] Questions (and initial responses) on using version control: Why cannot I push my single (master) branch to origin without an error occurring?

Alex Kleider akleider at sonic.net
Fri May 1 06:21:30 CEST 2015


On 2015-04-30 20:39, boB Stepp wrote:
> I created my remote repository on, say my C-drive, with "git init". I
> then copied and pasted a file to that location and put it under
> version control with "git add filename.py". Next I went to my E-drive,
> which is where I intend to be my working directories. After setting up
> a similar directory structure (/Projects/), I typed "git clone
> C:/Projects/project_name" and the desired result appeared on E:
> E:/Projects/project_name/filename.py. All seemed well with the world!
> 
> Now I made some edits to filename.py in my working directory,
> added/committed and then attempted to push to the remote repository
> and got this:

I would suggest the following work flow to set up two parallel 
repositories:

cd <first repo directory>
git init
<do what ever>
git add <files on which you did what ever>
git commit

cd <directory where you want the same repository>
git clone <first repo directory>
# the above command brings in a copy of all that was committed in the 
first repo.

Once this is done, I believe your subsequent commits can be pushed 
without the errors.





More information about the Tutor mailing list