I have git situation like below and im new to git too :
What should i do if i have to create new branch (ex:A02) to implement new feature In my thinking there are 2 options :
Please advise, appreciate your help.
I do made some changes in Projects file but for local environment only (not pushed)
What you need to do depends on what you want to do with your local changes.
git stash
. This will clear your working tree and index tree in your repogit pull
. It should complete successfully.git stash apply
. Remember, you might get merge conflict while applying it back. You need to resolve them.git pull
. You might get merge conflict, you need to resolve them.One option is to create a new branch to track your local changes.
git checkout -b <new branch name>
git checkout develop
git pull
git checkout <new branch name>
Another option,
git checkout -b A02 origin/develop
(Assuming your remote repo name uses the default name, origin.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.