$ git pull origin "remote_name"
If you receive an error like this:
error: Your local changes to 'projectFolder/fileName' would be overwritten by merge. Aborting. Please, commit your changes or stash them before you can merge.
You can ‘stash’ your local changes and revert them later by using the command:
$ git stash save "comment goes here - describe reason Local copy diffs from repo?"
Then you can do the pull without any errors.
$ git pull origin "remote_name"
To restore the stash from earlier use the command:
$ git stash pop
Hope this is helpful to those using git for deployment.
No comments:
Post a Comment