-
Notifications
You must be signed in to change notification settings - Fork 390
Reviewing a StoryQuest submission #957
-
This guide has moved to https://github.com/endlessm/threadbare/wiki/Reviewing-a-StoryQuest-submission
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
git checkout $(git merge-base main HEAD) scenes/tileset.tres
You can use the ... syntax here too, at least when using git restore which is the newer spelling for the "restore the contents of files" behaviour of checkout:
-s <tree>, --source=<tree>Restore the working tree files with the content from the given tree. It is common to specify the source tree by naming a commit, branch or tag associated with it.
If not specified, the contents are restored fromHEADif--stagedis given, otherwise from the index.
As a special case, you may useA...Bas a shortcut for the merge base ofAandBif there is exactly one merge base. You can leave out at most one ofAandB, in which case it defaults toHEAD.
So I believe you can spell that command as:
git restore --source=main... scenes/tileset.tres
Beta Was this translation helpful? Give feedback.
All reactions
-
git restore --source=main... scenes/tileset.tres
Much better, thanks! Updated. The only difference is that git checkout $(git merge-base main HEAD) scenes/tileset.tres was adding the file to the git cache. I prefer doing git add myself so this is better.
Beta Was this translation helpful? Give feedback.