Skip to content

Instantly share code, notes, and snippets.

@alpenzoo
Forked from nasirkhan/git command.markdown
Last active July 6, 2018 12:38
Show Gist options
  • Save alpenzoo/f592c8c01aa8b70e19f4c3abed9f2e1c to your computer and use it in GitHub Desktop.
Save alpenzoo/f592c8c01aa8b70e19f4c3abed9f2e1c to your computer and use it in GitHub Desktop.
`git` discard all local changes/commits and pull from upstream

git discard all local changes/commits and pull from upstream

git reset --hard origin/master

git pull origin master

To ignore file: git checkout pom.xml

To perform a pull: git pull

Maven clean:

mvn dependency:purge-local-repository

mvn clean package

mvn clean package -DskipTests=true

mvn clean compile

or mvn clean install -DskipTests=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment