Thursday, April 1, 2021

How to create another branch from Main branch using command line

 Go to your EC2 instance or where ever your code exists in local repository. login to your instance and go to your repo.

cd reponame

Now let's create a new branch called develop from main branch.

git checkout -b develop

Now you can see how many branches are created locally.

git branch

git push --set-upstream origin develop


That is how you create a new branch from command line and push that branch into Remote repo.

No comments:

Post a Comment

DevSecOps Bootcamp Apr 2025 Schedule | DevOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

✔️ "🚀 DevSecOps Bootcamp - Master Security in DevOps | April 2025" Are you ready to  supercharge your career  in  DevSecOps ? Whe...