Created
February 20, 2018 09:32
-
-
Save sylvaincombes/f87bcbc1752f015dcccb3784b1b44c96 to your computer and use it in GitHub Desktop.
temp git pull on one file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git fetch --all # read distant git datas | |
git checkout origin/master -- composer.lock # get only the composer.lock file from origin/master | |
# [do your things] | |
git reset HEAD composer.lock # cancel operations on composer.lock file | |
git checkout composer.lock # reset composer.lock file to the previous state (back to a clean git status) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment