I am trying to commit from two different repo with below scenerio…
- Have created some files in gitHub in “master” branch
- Created two local repo as Repo1 and Repo2 and pull from master branch form git.
- Make changes in both the Repo in local but when trying to push the changes from Repo one by one getting error as
! [rejected] master -> master (fetch first)
error: failed to push some refs to ‘https://github.com/Baharul1/testRepo.git’
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.
- When trying to make sync both the local Repo from gitHub using pull …getting error as
error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use ‘git add/rm <file>’
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
Can anyone please help how to make this set-up . We are not allowed to make changes in same branch?
What is the ideal project set-up. like first pull from central Repo and then create Branch in localRepo & make changes. Then merge to central repo or when to merge.