- ensure all changes in your branch are commited
git fetch
git rebase origin/develop
git diff origin/develop
git rm <path to file>
- removes unrequired files before commitinggit checkout origin/develop <path to file>
- resets files to previous state after commitinggit commit -am "new changes"
- sends new commit with appending changes
git reset --hard <remote>/<branch_name>
no merging, no rebasing, simply put the local branch to exactly the same state as the remote is.
https://stackoverflow.com/questions/37972753/git-reset-single-file-in-feature-branch-to-be-the-same-as-in-master-main https://stackoverflow.com/questions/3876977/update-git-branches-from-master https://stackoverflow.com/questions/12481639/remove-file-from-latest-commit https://stackoverflow.com/questions/39399804/updates-were-rejected-because-the-tip-of-your-current-branch-is-behind-its-remot
https://stackoverflow.com/questions/3876977/update-git-branches-from-master https://stackoverflow.com/questions/10641361/get-all-files-that-have-been-modified-in-git-branch https://stackoverflow.com/questions/39459467/remove-a-modified-file-from-pull-request https://stackoverflow.com/questions/3876977/update-git-branches-from-master https://stackoverflow.com/questions/11356460/how-to-cleanly-get-copy-a-remote-git-branch-to-local-repository https://stackoverflow.com/questions/61212/how-do-i-remove-local-untracked-files-from-the-current-git-working-tree