Closed funderburkjim closed 4 years ago
My suggestion would be
cd csl-corrections
git pull origin master
cd ../csl-orig
git pull origin master
This will ensure that all changes on cologne is pulled before starting.
cd csl-corrections
git add .
git commit -m 'commit message'
git pull origin master
git push origin master
The step of git pull origin master
will pull any additional commits which may have been made on github while one was working.
If there is no clash, continue as usual with pushing step.
Git will throw an error on local machine that X file is changed in both commits and therefore I am unable to merge. In our case these files may be cfr.tsv or correctionform.txt or something like it.
When this file is opened in text editor, it will be like
>>>>>>> HEAD abcd
change 1
<<<<<<<< HEAD efgh
change 2 in the same line.
Make editing in the file and keep only the relevant line.
Thereafter you can commit and push from local , without any problem.
<<<<<<< HEAD
12/17/2019 05:38:26 MW 260415 हथ हठ In Printed book page 1287,3 it is scripted Haṭha. Notice the diacritic mark of the letter ṭ. Typo. Not infrequently I have encountered words that are present in MW but not in Apte. So I go about seeking clarification from my knowledgeable friends. That is how I learnt about हथ sanaatani@gmail.com:No correction needed.
12/17/2019 20:30:45 MW maatR^ikaa Typo :Not enough information
=======
12/17/2019 05:38:26 MW 260415 हथ हठ In Printed book page 1287,3 it is scripted Haṭha. Notice the diacritic mark of the letter ṭ. Typo. Not infrequently I have encountered words that are present in MW but not in Apte. So I go about seeking clarification from my knowledgeable friends. That is how I learnt about हथ sanaatani@gmail.com
12/17/2019 20:30:45 MW maatR^ikaa Typo
12/18/2019 19:52:27 WIL 167 अक्षविद् विट् who knows. विद् who knows. विट् tvitaly1@yandex.ru
12/18/2019 20:02:33 WIL 167 अक्षविद् विट् who knows. विद् who knows. विट् tvitaly1@yandex.ru
12/18/2019 20:46:26 WIL 5927 आवेद्य विट् to know, विद् to know, विट् tvitaly1@yandex.ru
12/18/2019 22:09:47 WIL 41435 सा तट् that, &c. तद् that, &c. तट् tvitaly1@yandex.ru
>>>>>>> 116c27c04445ea17ef922d3fa09f87a896ad76f0
This means that my local changes in हथ and मातृका are not present in the github. Whereas the addition of 4 WIL changes is not present in my local copy.
The corrected version would read like this
12/17/2019 05:38:26 MW 260415 हथ हठ In Printed book page 1287,3 it is scripted Haṭha. Notice the diacritic mark of the letter ṭ. Typo. Not infrequently I have encountered words that are present in MW but not in Apte. So I go about seeking clarification from my knowledgeable friends. That is how I learnt about हथ sanaatani@gmail.com:No correction needed.
12/17/2019 20:30:45 MW maatR^ikaa Typo :Not enough information
12/18/2019 19:52:27 WIL 167 अक्षविद् विट् who knows. विद् who knows. विट् tvitaly1@yandex.ru
12/18/2019 20:02:33 WIL 167 अक्षविद् विट् who knows. विद् who knows. विट् tvitaly1@yandex.ru
12/18/2019 20:46:26 WIL 5927 आवेद्य विट् to know, विद् to know, विट् tvitaly1@yandex.ru
12/18/2019 22:09:47 WIL 41435 सा तट् that, &c. तद् that, &c. तट् tvitaly1@yandex.ru
Note that I have removed <<< and === etc lines and kept only the relevant part.
After this, I can do git add, commit, push etc without any problem.
Because in local machine, we have luxury of using text editor of our choice, such changes are easier made in local machine than upstream cologne server. Therefore a 'git pull' locally gives me more comfort when there is a clash. I can correct and update.
This would obviate the need of git revert or recloning or any other drastic step.
It has served its documentation purpose. Closing.
Dhaval - Had an awkward time with git. I think it occurred because 1) you pushed a change (involving cfr.tsv, WIL) 2) while I was locally also making changes to cfr.tsv (involving pwg). 3) Also, There were 4 additional WIL corrections at Cologne that were not present in my local cfr.tsv -- again, probably they were entered while I was working.
I think I solved the problem with a 'git revert',
Here are some details that may let you check my work.
Some details
I pulled , did some corrections to pwg, and pushed. (all local)
Then, on Cologne, I pulled --- but got an error. I also tried to 'push' from cologne, and also got an error.
I solved this by doing a 'revert', but just before the revert here are the git logs for Cologne csl-corrections, and (a newly clone) Github (same as my local).
Cologne git log before the revert
Github (and my local) log:
I recloned github, and then did a local log
The local revert
And finally ...
On local machine:
git push
On Cologne:
git pull
# now it works.It appears that the only difference is that file changed by 0525f95 needs to be rechanged.
how to guard against this?
Very time-consuming to deal with this, though learned a bit about 'git revert'.
@drdhaval2785 Questions: