Is there a git-merge –dry-run option?

As noted previously, pass in the –no-commit flag, but to avoid a fast-forward commit, also pass in –no-ff, like so: To examine the staged changes: And you can undo the merge, even if it is a fast-forward merge:

Found a swap file by the name

Looks like you have an open git commit or git merge going on, and an editor is still open editing the commit message. Two choices: Find the session and finish it (preferable). Delete the .swp file (if you’re sure the other git session has gone away). Clarification from comments: The session is the editing session. You can see what .swp is being used by entering … Read more

Is it possible to pull just one file in Git?

You can fetch and then check out only one file in this way: Regarding the git checkout command: <revision> — a branch name, i.e. origin/master <yourfilepath> does not include the repository name (that you can get from clicking copy path button on a file page on GitHub), i.e. README.md

Is there a “theirs” version of “git merge -s ours”?

A similar alternative is the –strategy-option (short form -X) option, which accepts theirs. For example: However, this is more equivalent to -X ours than -s ours. The key difference being that -X performs a regular recursive merge, resolving any conflicts using the chosen side, whereas -s ours changes the merge to just completely ignore the other side. In some cases, the main problem using -X theirs instead of … Read more