Skip to content

Instantly share code, notes, and snippets.

@tdlm
Created August 14, 2017 17:41
Show Gist options
  • Save tdlm/b85ed0a66fbb3a9c42918b028e552e54 to your computer and use it in GitHub Desktop.
Save tdlm/b85ed0a66fbb3a9c42918b028e552e54 to your computer and use it in GitHub Desktop.
Git wizardry.

Copy files from another branch into new branch

$ git checkout master
$ git checkout -b new_branch
$ git checkout old_branch -- path/to/filea.ext
$ git checkout old_branch -- path/to/folder/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment