Git Tutorial How Can I rename a local Git branch Simply explained

Git docs: We often need to rename our local branch to a new name. Let us take a closer look at how we can accomplish renaming this


> "git pull" does a "git fetch" followed by a "git merge"

  • "git fetch" updates our remote-tracking branches which we can safely execute anytime since it doesn't change any of our local branches.
  • "git pull" brings a local branch up to date with it's remote branch; while also updating our other remote-tracking branches.