Git Create Branch and Push

Feb 18, 2020

Create branch (without switching)

git branch sample

If you need to switch branch and make changes.

git checkout -b sample

Push to server

git push origin sample

List branch

git branch

Switch branch

git switch sample

NOTE: switch is available for Git 2.23. Check git version (git --version) and upgrade git if necessary.

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.