I am really sorry this is such a vague request but I need some git help. I know enough to do something pretty stupid, but not enough to know how to avoid doing something very stupid.
I have a remote git server and a working directory on that server. I just need a ‘master’ for version 1.0 with a development branch and a ‘master’ for version 1.1 with it’s own development branch. I need to be able to work on these independently. I only want one repository so perhaps there would be a master with a 1.0 branch with its own devel branch and a 1.1 branch with its own devel branch.
I don’t mind experimenting, if I have a back-out plan, and don’t mind learning the hard way but I’m not the only one who uses this repository and I’ve been asked to make a version 1.1 workspace for the group and I don’t know the best way to do that. I also don’t know how to back out of anything dumb that I may have done.
After hours and hours of googling and trying to find git books and cookbooks, nothing I’ve come across helps me because I don’t know how to refer to my remote branch properly, among other things, and there is something fundamental that I’m failing to comprehend. I’m at the point I don’t know where else to turn. I’ve seen many posts that get me close to what I need but I can’t get past a few hurdles without being able to refer to my set up since git doesn’t click for me, yet, and I can’t extrapolate others’ recommendations onto mine without asking more specific questions.
Is somebody willing to do a little back and forth question/response session with me to help me understand git’s brains and verify my setup?
Here’s a bit to get us started:
SERVER$ git branch -r
origin/devel
origin/master
SERVER$ git branch -l
* devel
master
SERVER$ git branch -a
* devel
master
remotes/origin/devel
remotes/origin/master
SERVER$ git remote show origin
* remote origin
Fetch URL: /git/sold.git
Push URL: /git/sold.git
HEAD branch: master
Remote branches:
devel tracked
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local refs configured for 'git push':
devel pushes to devel (up to date)
master pushes to master (up to date)
Thanks in advance.
This is only my second post on stackoverflow, I hope it is helpful.
master branches
inside repo switch to master branch
now create a copy of the master branch sitting at tag 1.0
switch back to master branch
now create a copy of the master branch sitting at tag 1.1
dev branches
switch back to master branch
now create a dev branch from master sitting at tag 1.0
switch back to master branch
now create a dev branch from master sitting at tag 1.1
if ok push changes to the remote
At this point you would have 6 branches total.
Your original master and dev plus the new copies.
Development can take place on the newly created branches without impacting master.
It may not be conventional to have a tag number in the branch name but it will accomplish the task of communicating quickly the branches origin or purpose.
Further you can remove, merge, or re-create the branches easily.
To remove branches
remote – (don’t forget the “:”)
local – cannot be on the branch you are trying to delete, -D for un-merged branch