GotelliLab / EcoSimR

Repository for EcoSimR, by Gotelli, N.J. , Hart E. M. and A.M. Ellison. 2014. EcoSimR 0.1.0
http://ecosimr.org
Other
27 stars 10 forks source link

Merge conflicts #61

Closed ngotelli closed 9 years ago

ngotelli commented 9 years ago

Hi @emhart

I worked today on the co-occurrence and niche overlaps vignettes. I was able to stage and commit these changes on my machine, but when I tried to push them to the remote repository, there was a conflict. What should I be doing differently to avoid this? Thanks!

N.

:dog: :walking: then :cocktail:

emhart commented 9 years ago

Hi @ngotelli

The best thing to do is to pull first before you do anything. Then make your changes, commit them, and push. That should prevent any issues. I updated my roxygen library, that was causing a number of changes with every push on my end, I think we should now be using the same version.

ngotelli commented 9 years ago

OK, but if I issue a pull now, will that over-write my changes for the vignettes? I thought that by recloning the repo that would have given me the most current copy, but maybe not. I updated my R to 3.1.3.

N.

Quoting Edmund Hart <notifications@github.com>:

Hi @ngotelli[1]

The best thing to do is to pull first before you do anything. Then
make your changes, commit them, and push. That should prevent any
issues. I updated my roxygen library, that was causing a number of
changes with every push on my end, I think we should now be using
the same version.

— Reply to this email directly or view it on GitHub[2].  

 


Nicholas J. Gotelli       Office Phone: 802-656-0450
Department of Biology     Lab Phone: 802-656-0451   
University of Vermont     Fax: 802-656-2914
Burlington, VT 05405      e-mail: ngotelli@uvm.edu
********************************************************
Home Page (with manuscript pdfs):

http://www.uvm.edu/~ngotelli/homepage.html

Musician's Corner (with mp3s):

http://www.uvm.edu/~ngotelli/musicpage/music.html

NEW: EcoSimR (free software for null model analysis):

http://www.uvm.edu/~ngotelli/EcoSim/EcoSim.html


Links:

[1] https://github.com/ngotelli [2] https://github.com/GotelliLab/EcoSimR/issues/61#issuecomment-82042601

emhart commented 9 years ago

If you pull now, and merge, it will not overwrite your changes. However if you re clone, you will lose your changes. So go ahead and pull and merge.

ngotelli commented 9 years ago

Just tried it, and it says it can't pull because there are unmerged changes. It also won't merge because of these.

Quoting Edmund Hart <notifications@github.com>:

If you pull now, and merge, it will not overwrite your changes.
However if you re clone, you will lose your changes. So go ahead and
pull and merge.

— Reply to this email directly or view it on GitHub[1].  

 


Nicholas J. Gotelli       Office Phone: 802-656-0450
Department of Biology     Lab Phone: 802-656-0451   
University of Vermont     Fax: 802-656-2914
Burlington, VT 05405      e-mail: ngotelli@uvm.edu
********************************************************
Home Page (with manuscript pdfs):

http://www.uvm.edu/~ngotelli/homepage.html

Musician's Corner (with mp3s):

http://www.uvm.edu/~ngotelli/musicpage/music.html

NEW: EcoSimR (free software for null model analysis):

http://www.uvm.edu/~ngotelli/EcoSim/EcoSim.html


Links:

[1] https://github.com/GotelliLab/EcoSimR/issues/61#issuecomment-82057421

emhart commented 9 years ago

Hmmm, ok, here's what we can do. Why don't you just make a new branch and push it up and I'll do the merge.

$ git checkout -b vignettes
$ git add --all
$ git commit -am "updated vignettes"
$ git push origin vignettes
ngotelli commented 9 years ago

Unfortunately, when I try to create the branch, I get:

$ git checkout -b vignettes
vignettes/CoOccurrenceVignette.Rmd: needs merge
vignettes/nicheOverlapVignette.Rmd: needs merge
error: you need to resolve your current index first
emhart commented 9 years ago

Ok, well, first make a copy of them elsewhere just as back up. Have you committed your changes locally? If not, do that. Then when you merge, you'll get asked to resolve the conflict. You can just do that, and then commit again. That might fix it.

Worst case scenario, just preserve your backups, then delete the git repository (But be careful not to delete your two vignette backups) . Then clone, add them, and push up to github.

ngotelli commented 9 years ago

OK, It still would not let me merge, so I had to go the worst case route, but that worked, and I pushed everything successfully up to github. Thanks! :zzz:

emhart commented 9 years ago

Ok, well, I'll work on it some more, but I think if you pull first before you make changes we should be able to avoid further issues (I hope )

ngotelli commented 9 years ago

Thanks Ted. I will keep my nose clean and assiduously pull from the repository before starting my work. I will also try to add and commit a little more frequently as I work.

More soon,

Nick

Quoting Edmund Hart <notifications@github.com>:

Ok, well, I'll work on it some more, but I think if you pull first
before you make changes we should be able to avoid further issues (I
hope )

— Reply to this email directly or view it on GitHub[1].  

 


Nicholas J. Gotelli       Office Phone: 802-656-0450
Department of Biology     Lab Phone: 802-656-0451   
University of Vermont     Fax: 802-656-2914
Burlington, VT 05405      e-mail: ngotelli@uvm.edu
********************************************************
Home Page (with manuscript pdfs):

http://www.uvm.edu/~ngotelli/homepage.html

Musician's Corner (with mp3s):

http://www.uvm.edu/~ngotelli/musicpage/music.html

NEW: EcoSimR (free software for null model analysis):

http://www.uvm.edu/~ngotelli/EcoSim/EcoSim.html


Links:

[1] https://github.com/GotelliLab/EcoSimR/issues/61#issuecomment-82101261