Saturday 3 October 2020

Working with Forks

Sinkronisasi Upstream Git Tag ke Local Fork

cd /path/to/fork/clone

git remote add upstream url/original/repo

git fetch --tags upstream

#Push the tag from my local to my master branch

git push -f --tags origin master


  1. Configuring a remote for a fork,
  2. Syncing a fork,
  3. Upstream git tag is not showing in forked repository,

Wednesday 29 July 2020

How to Move a Private Repository from Bitbucket to Github

$ git clone
$ git remote add upstream
$ git push upstream master
$ git push --tags upstream

Tuesday 28 April 2020

How to discard local changes and pull latest from Git repository

Sometimes we want to pull latest code from Git repository and ignore all changes in locales.

Run the below commands (or you can see directly on web interface git repo you used)

git log

From this you will get your last push commit hash key

Or you can

git reset --hard <your commit hash key>