Convention over Git = CoG

Convention over Git or CoG influences on automated conflict solving during automated synchronization of remote Git repositories.

Naming convention

The Convention over Git uses naming to define owners of Git-branches.
More often I use prefixed names for this.
I.e. each remote Git repository owns its prefix.
(It allows for all non-fast-forward Git-conflicts to be solved in favor of a prefix owner.)

Examples

Let's say one team uses prefix "company1/".
(Git allows you have slashes in branch names)
And another team uses "company2-".

For this we may have flogging synchronized Git-branches.

company1/develop
vs
company2-develop

company1/JIRA-123
vs
company2-JIRA-321

or simply
company1/my-cool-feature
company2-my-bug-fixing

So, a naming convention in Git can be any conventional separation of names. It depends on you implementation.
I use prefixes in my implementations.
Results

Conventions over Git gives many advantages and drastically simplifies any implementation.
Possibly it is unclear at first glance, but it's worth it.

  • Please, do not migrate everything between repositories. It is absolutely not necessary and even harmful! CoG just allows to save your repositories in sanity.
  • GoG adds some level of self responsibility and implies some self management. You shouldn't control everything. Believe in your teams.

Comments

Popular posts from this blog

Approaches to synchronize remote Git repositories

Cheat-sheet of implementation for Pure Git with Convention over Git