Home > Net >  Failing to push to a dev branch in git
Failing to push to a dev branch in git

Time:04-07

I just recently started working on Azure and working with repos. I have no issues when it comes to pushing to master branch, but the moment I try to push to dev branch which a colleague created, I get the following error when pushing:

fatal: 'dev' does not appear to be a git repository fatal: Could not read from repository

I used these commands git push and git push dev

Any help would be appreciated

CodePudding user response:

You can get your actual branch with : git status, the name will be after On branch. Copy this name.

Then you can do : git push origin localBranchName:RemoteBranch

ex:
If git status return On branch main
To push on dev branch you need to do: git push origin main:dev

  • Related