Posts

Showing posts with the label git

Git Branching Strategy / Model - GitFlow

There are enough branching strategy available for git flow over the internet. Here i have compiled few branching strategy which i found in various blogs. A nice blog on Git based branching method/model http://nvie.com/posts/a-successful-git-branching-model/ Git Documentation  https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows Git Workflow  http://blog.endpoint.com/2014/05/git-workflows-that-work.html Git Flow https://datasift.github.io/gitflow/IntroducingGitFlow.html http://yakiloo.com/getting-started-git-flow/ Simple branching http://drewfradette.ca/a-simpler-successful-git-branching-model/ Another branching Model https://www.wearefine.com/mingle/env-branching-with-git/

Git repository backup

Git is distributes system, the beauty of the git make is more robust and easy to recover from any last known good working copy. However, You can not always rely on such copy and you will definitely need proper backup solution to deal with such situation. There are many ways to take backup of git repositories. I am listing few here. You can directly take a tar of the git repo directory as it has the whole bare contents of the repo on server. There is a slight possibility that somebody may be working on repo while taking backup. The following command will give you the bare clone of repo (just like it is in server), then you can take a tar of the location where you have cloned without any issue. git clone --bare {your backup local repo} {new location where you want to clone}

Git Repository Corruption - Part1

Git Repo Corruption recovery The biggest fear of any administrator is the Data corruption. As a Git administrator we do take regular backup, We keep our system HA, We even do disk replication. In short we try every thing to keep data safe and secure. But still there are chances for the git repository corruption and you have to deal with it in real world. Here are few repo corruption scenarios and solutions. Note-> Please make sure you backup everything before touching the repo. There are instruction to fix some of the error. It is always suggested to backup your data before trying to perform any action.

Git authentication for automation script

Git authentication When you write some kind of automation (script) which needs to interact with git and clone/pull data and perform some action. And if its behind authentication layer then you need a way to automate the authentication that can let you pass credentials and automation can run without any interruption. Either you can use ssh keys to authentication and use git@ URL to access your git repo. But if you want to access (or force to) git via https URL you need to pass credential explicitly. There are 2 ways to achieve this task for http protocol.