Closed jcohenadad closed 2 years ago
Note: the problem really came from the command git annex sync --content
, which push my changes (although the only thing i wanted was to refresh my local repos from the origin one). I suggest we have a "dummy user" section with the command to get latest update from the remote repos to avoid these incidents.
Investigate
[kousu@requiem data-multi-subject]$ git log
commit 9d27a7010d8d528e369a7ed86b6278c64a7cdf77 (HEAD -> master, origin/synced/master, origin/master, origin/HEAD)
Merge: 20117852 036532b0
Author: Julien Cohen-Adad <jcohen@polymtl.ca>
Date: Fri Jun 25 20:53:15 2021 -0400
Merge remote-tracking branch 'refs/remotes/origin/master'
commit 20117852f95ea9d0c1fb838bbf86959ec8e325d0
Merge: 960aef20 384cf4ac
Author: Julien Cohen-Adad <jcohen@polymtl.ca>
Date: Fri Jun 25 20:53:14 2021 -0400
git-annex in julien@julien-macbook.local:~/code/spine-generic/data-multi-subject
commit 036532b010603b34b31df3d2fe26dc9390876677
Author: Nick Guenther <nick.guenther@polymtl.ca>
Date: Sun Apr 18 10:33:45 2021 -0400
script for linting .tsv files
Simple fix: a hard reset
[kousu@requiem data-multi-subject]$ git reset --hard 036532b010603b34b31df3d2fe26dc9390876677
HEAD is now at 036532b0 script for linting .tsv files
Disable branch protection
Upload
[kousu@requiem data-multi-subject]$ git push -f
Enter passphrase for key '/home/kousu/.ssh/id_rsa.github':
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:spine-generic/data-multi-subject.git
+ 9d27a701...036532b0 master -> master (forced update)
Reenable branch protection
@jcohenadad https://github.com/neuropoly/data-management/pull/97 ?
You'll have to do this to fix up your local copy
git checkout master
git fetch
git reset --hard origin/master
Looks like it worked! (I think):
But now, what is the best way to get rid of local (not added, not committed) changes?
thanks!!!
@jcohenadad: git clean -i
issue was fixed so we can safely close
Sorry, I think I messed up. I pushed files that are wrongly merged. Example:
Problematic commit: 9d27a7010d8d528e369a7ed86b6278c64a7cdf77