Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

We use the common git workflow, which means we have two major branches:

  1. Master: For stable and RPM deployment
  2. Dev: For development stuff

All Feature Requests are branched from Dev and merged to Dev.

Dev will only be merged to master (not backwards)!

Bugfixes are splitted into hot- and bugfixes. See bellow section.

 

see: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

Bugfix vs Hotfix

Bugfix: not so important, will be merged to next released in normal schedule cycle of the software into dev (and then from dev to master)

Hotfix: important bug, branch from master - merge into master & dev, will be released soon / faster. Important security fixes, ...

Howto add a new branch

  1. Add branch in Atlassian Stash via "Create Branch"
    1. from Dev
    2. Append your own prename at the end of the branches name!
  2. on local machine do:

# git pull all branches
git pull

# git add local branch auto following/tracking remote branch
git checkout --track origin/feature/config

# git push auto to remote branch -> 
# see Git config global push.default = simple
git push

Useful GIT stuff

Push style

# push all branch names on local git to same names on remote git 
git config --global push.default simple

Enable server certificate on client

Trying to clone/fetch whatever a repo the git server ends with the error message

fatal: unable to access 'https://user@devel.roetzer-engineering.com:3128/stash/scm/pro/laravel.git/': Peer's certificate issuer has been marked as not trusted by the user.

To avoid this currently there is the following in ~/.gitconfig:

 

[http]
        sslVerify = false

 

which simply deactivates the certificate check.

The better (and safer) way is to download the server's certificate and make it known to git – therefore you can use the following script: enable_server_cert.sh

Don't forget to reset/delete the sslVerify statement in ~/.gitconfig

Useful log commands

show commit history with graphical branching information
# graphical illustration of branches
git log --graph --full-history --all --pretty=format:'%Cred%h%Creset %ad %s %C(yellow)%d%Creset %C(bold blue)<%an>%Creset' --date=short
git log --graph --oneline --decorate --all

# example output
* f1270f7 (HEAD, master) update README
* 9af9d3b add a README
* 694971d update phrase to hola world
| * e3eb223 (mundo) add more tests
| * 7cff591 add testing script
| * c3ffff1 changed text to hello mundo
|/
* b7dcc89 initial hello world code
  • No labels