3

In our enterprise, as part of DevOps team, we do not have privilege to install git on local laptop and fetch the GitLab code repo. Jenkins tool has ssh access to GitLab repo, but we do not have ssh access to jenkins(Git installed). We have access to see the repo through a GitLab portal, something like this and then configure Jenkins to fetch code from GitLab.

So, I cannot run commands like git log --all --decorate --oneline --graph on my laptop, to understand the merge aspect.


Under tags section of Gitlab portal in our enterprise, I see an entry, as shown below:

enter image description here


I understand that tag is an alias of git commit hash key(40 char), but I need clarification on above entry where tag name(sprint12-tag) is specified for a merge of branch(feature-branch-x) to branch(develop).

As mentioned here, A tag represents a version of a particular branch at a moment in time. A branch represents a separate thread of development that may run concurrently with other development efforts on the same code base.

So, my understanding is that, a tag sprint12-tag has been assigned to a specific commit(could not be a latest commit) on feature-branch-x, as shown below:

enter image description here


As of now, I see below options in GitLab home page, when I click on left-top icon

enter image description here


Questions:

0) How to view such graphs(above) on GitLab portal? unless we run git log --all --decorate --oneline --graph on local laptop...

1) With the above tag(sprint12-tag) on any branch(in this case feature-branch-x), Can I say that, developer has run below commands?

$ git checkout develop
$ git merge sprint12-tag # ignoring the latest commit c5 on 'feature-branch-x'

$ #   or it can be `git merge e324567`

2) How do I understand below entry? as shown here for example...

enter image description here

overexchange
  • 15,768
  • 30
  • 152
  • 347

2 Answers2

1

On GitLab, select Repository > Graph in the left sidebar to view the repo's commit tree. This will show all of the commits and merges, annotated with branch names and tags.

[2.2] in the image below is a tag.

I would say that, generally, developers tag commits manually after merging some work. You do your final merge or PR from dev into master and get a resulting merge commit. This merge commit is then tagged as release2.0 and never moves from that commit. I'm sure this is automated in some organizations as well.

How do I understand the below entry?

That image shows a tag named v11.7.5. This tag has been annotated on GitLab (not in git itself) as "Version v11.7.5". The commit the tag points to is c5b5b18b. That commit's commit message is Update VERSION to 11.7.5

example:

https://code.sealedabstract.com/drewcrawford/CaveJohnson2/network/master

enter image description here

pkamb
  • 33,281
  • 23
  • 160
  • 191
1

A tag represents a version of a particular branch at a moment in time.

This quote is misleading. Tags and branches are two independent things. You should think of a tag as a static marker at a particular commit. On the other hand, a branch is dynamic and moves as you add commits to the branch. For more discussion about the different between branches and tags, check out this Q&A on our Software Engineering sister site.

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268