1

What's command to change the commit in the ".git\HEAD" file without changing any other files? I needed files from one branch, but the Head points to another

EricSchaefer
  • 25,272
  • 21
  • 67
  • 103
Ilya
  • 720
  • 6
  • 14

1 Answers1

2

If you just want to check the outcome of a merge, you could just do the merge. If it is successful you can undo it with git reset HEAD^1. If it fails with conflicts you can go back with git merge --abort. Another possibility is doing a merge without commit as @evolutionxbox suggested (git merge <branch_name> --no-commit).

EricSchaefer
  • 25,272
  • 21
  • 67
  • 103