Easiest way to import modified file into git repository -



Easiest way to import modified file into git repository -

i'm collaborating on (latex) document using git repo, 1 of our collaborators prefers not utilize git. easiest solution, seems, send him latest version when wants create edits, , have 1 of git users add together these changes repo (using 'diff' patch changes example). question how 1 can using git commands i.e. possible override current files in repo versions , run git command merge these changes latest commit? or should separate branch first created?

since dealing file changes not recorded git, using branches easier track changes. otherwise, current state can messed due changes introduced other person

let file dealing hello.tex.

create branch, no-git-person, branch sharing file person.

git checkout -b no-git-person

at stage, file in sync master.

mail/share file branch, , 1 time makes edits , sends 1 of git using person, checkout to no-git-person branch , create commit, maybe signing commit name other git users can know

git commit -m "[signed by] meta info here"

merge master branch

git merge master

successful merge: in case of successful merge, merge file master

git checkout master git merge no-git-person

merge conflict: in case of merge conflict, abort merge

git merge --abort

sit , resolve changes. commit , merge master again.

git commit -m "[signature info] resolved conflict" git checkout master git merge no-git-person

if want share again, do

git checkout no-git-person git merge master // synced latest work; can share file branch

the thought maintain changes person not using git without polluting branch in git users working. incorporate changes work if sure if there no conflicts.

the problem person not using git had wait git users give updated file create changes. defeats purpose of collaboration.

if can, convince person utilize git. save future collaboration headaches.

git

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -