I done a clone of a projet via ssh
git clone ssh ssh://[email protected]:IMER/ropolo.git
master
branch is protected so I can't push my changed.
there is another branch dev_ropolo
.
Do I need to bring this branch locally. What is needed to do to be able to push my change to this branch?
Edit:
$ git fetch
* [new branch] ropolo -> origin/ropolo
$ git branch
* master
Use fetch command in the local repo
$ git fetch
check that your branch has come to your local using
$ git branch
now change your branch using checkout
$ git checkout -b branch_name
do some changes then
$ git add .
$ git commit -m "message"
$ git push origin remote_branch_name
git push <remote> <branch with new changes>:<branch you are pushing to>
Eg : git push origin branch1:branch2
You said you cloned locally the repository, you can then access the branch dev_ropolo
via:
git checkout dev_ropolo
you now have selected dev_ropolo
as the current branch: do your local changes, add and commit, and then push them using:
git push origin dev_ropolo
(assuming that the remote is set to origin
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With