How to create a new branch with new project in git remote ?

if you just downloaded project to git remote without clone. don't worry you can fix this. :)

You need a project with connections to git and empty folder for clone.
Right click Git Bash Here

git clone YourRemoteRepository  

or  

git clone -b YourBranchname YourRemoteRepository


You should go project folder


cd projectnamefolder


Create new branch

git checkout -b NewBranchName


you should replace your new project with current project. But please don't touch .git and if 2 projects the same please don't touch .gitignore.

you can look is that everything changed?

git status


you can propose changes


git add.


commit

git commit -m YourCommitMessage


finally push remote

git push -u origin NewBranchName


you can merge other branches !! good luck

Yorumlar

Popüler Yayınlar