Last active
September 24, 2019 06:28
-
-
Save azizultex/ea3d3dcd52a9710a88588e35c8dbb357 to your computer and use it in GitHub Desktop.
Git commands
This file contains hidden or 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
# Delete everything and upload new version | |
# resource: https://stackoverflow.com/questions/11071420/delete-everything-and-upload-new-version#11072408 | |
git fetch | |
git merge -s ours origin/master --allow-unrelated-histories | |
git push origin master | |
# ignore remote files and push new files and updates to remote | |
git push --force origin master | |
# untrack all files if need to add a new file / folder to .gitignore and add new files and push to remote | |
git rm -r --cached . | |
git add . | |
git commit -m "your message" | |
git push | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment