https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request
How to fetch remote changes?
> git fetch --all
> git fetch --tags
How to remove and untrack files?
> git rm --cached "<file_path>"
Adding submodule
> git submodule add <git_url> <directory_path>
# If you have a tag named '12345' then you would just do this:
> git tag -d 12345
> git push origin :refs/tags/12345
# That will remove '12345' from the remote repository.
How to move and push a tag?
> git tag -f -a <version v1.0.0>
> git push -f —-tags
Squashing with previous commmit messages
# Reset the current branch to the commit just before the last 12:
> git reset --hard HEAD~12
# HEAD@{1} is where the branch was just before the previous command.
# This command sets the state of the index to be as it would just
# after a merge from that commit:
> git merge --squash HEAD@{1}
# Commit those squashed changes. The commit message will be helpfully
# prepopulated with the commit messages of all the squashed commits:
> git commit
Make sure your remote repository ssh/https are correct.
> git remote show
# It should display two remote repository namely origin and master
# if not you should remove all remote repository and manually add
# each which is origin (your fork repository)
# and upstream (which is the one you forked)
# Now if you do the following command it should display the correct
# remote reference
> git remote show origin
* remote origin
Fetch URL: [email protected]:organisation/your_forked_repository.git
Push URL: [email protected]:organisation/your_forked_repository.git
HEAD branch: master
> git remote show upstream
* remote upstream
Fetch URL: [email protected]:organisation/the_one_you_forked.git
Push URL: [email protected]:organisation/the_one_you_forked.git
HEAD branch: master
# This should tell you whether your origin or upstream has an update
# if yes you'll see the message
> git fetch --all