I am trying to clear the git repository and
- Create a new branch that reflects my production (main) branch.
- Delete unnecessary branches, remote or local.
- Create local branches of local branching (idk, if I need to do this, benefits?)
- You have a branch for each stage of my workflow, that is, one branch for local and dev (dev), 1 branch for setting (stage) and 1 branch for production (production). Local and dev can use the same working branch, but separate branches for production and production.
At the command line you can see my environment.
$ git remote dev origin production staging $ git branch -r dev/dev origin/HEAD -> origin/master origin/dev origin/master production/master wpengine-findcra/master $ git branch -vv dev xxxxxxx <comment> *master xxxxxxx [origin/master] <comment> production/staging xxxxxxx [remotes/production/master] <comment> staging/master xxxxxxx <comment>
I have 4 locations from which I work. The code changes from 1 to 4.
- my local machine
- development server
- staging server
- production server
I want to add a new branch specifically for the intermediate server, and now I want it to reflect the production (master) branch. But I came across this error , and I do not know what to do.
$ git checkout master $ git branch staging error: there are still refs under 'refs/heads/staging' fatal: Failed to lock ref for update: Is a directory
My code is updated at the beginning of / master and dev / dev.
source share