Branch Swap

Asked

Viewed 4,089 times

-2

I need help switching the branch of a folder. I’m going to participate in an open source project on github, so I cloned the folder I need via git, but the folder was in the master branch and I need it in another branch. I created a new branch, but now I don’t know how to get this folder out of the master branch and into this new branch that I created. When I open the folder in visual studio I can see that it’s in the master branch. I’m a beginner in git/github. Thank you.

  • tries: git checkout nameDaBranch

  • I had a similar problem, only it’s a few months old and I don’t remember exactly how I solved it. Try to see this link has a section called "Switch branch using git switch". Follow the link: https://devconnected.com/how-to-switch-branch-on-git/ Good luck...

  • First thing you have to do is a git pull, afterward git checkout suaBranch etc. Or it starts again, enters the master, a pull, creates a new branch and touches the boat

1 answer

0

Just give the following code:

git checkout {name-of-the-existing-already}

with: git branch

You can see all the existing branchs.

But if you’re having problems with git flow, there is a plugin that can be installed in the project that takes care of this tricky part:

sudo apt-get install git-flow

git flow init
git flow Feature start {Productpage} git flow Feature Finish {Productpage}

where Feature is written, is the name of the type of programming you will create, whether it is a Feature, or bugfix, and etc.

There is also a module for the application that standardizes commits and etc

The module is the commit: Yarn add commit

Browser other questions tagged

You are not signed in. Login or sign up in order to post.