This is going to sound like a total noob question but here goes anyway. Not new to Git but I am new to GitLab.
What’s the difference between the source and target branches in GitLab? Is the workflow I am describing below “standard” or “best practice”?
We have a Git Flow workflow. Branches are made of develop branch. We make a MR back into develop. When we want to deploy to staging, we make an MR into master. When we want to deploy to prodution, we make a tag off the current master. So far so good, right?
The way I am used to thinking about is that source is the new stuff and target is the existing stuff - maybe this is too simplistic but it has always worked for me in the past.
So when I go to check to see if there is anything new in develop that is not yet in master, I do a compare operation, pick develop for the source and master for the target. I see all the latest code since we last deployed to our staging environment. This is expected, what I am used to with Github, and makes perfect sense to me.
Now when I want to see what has changed in master since we last deployed production, I go to compare on the repo, pick master for source and the latest tag for target, and there I see everything that we have in staging that has not yet been tagged and deployed to production. This makes sense too.
Now I have another repository that has an integration branch, and all new test code they want to see in staging is merged into integration. On this repo I was instructed to put “existing stuff” into “source” and “new stuff” into target, and I get confused on which branch should go to source and which one to target. Has anyone else used source and target differently?