Posts

Showing posts with the label Tortoise git

Git Auto Increment tag

If you want GIT tag autoIncrement with one version number after each build you can use below shell script(./gittag.sh) as the hook. Scrip will find last committed TAG which starts with  ENV_TAG_PREFIX ( QA_V) and creates next release TAG then push tag to GIT. VERSION_MODE   [major|minor|revision|buildNumber - These are the possible value. each time one version is a tag with GIT. By default, buildNumber is pass which increment last digit in release tag like(x.x.x.1 to x.x.x.2). So if you want major release then you can pass major as option which tag GIT with major release  like (1.x.x.x to 2.x.x.x)] e.g. ./gittag.sh major       ./gittag.sh minor #!/bin/bash VERSION_MODE = $1 ENV_TAG_PREFIX = QA_V # "major": 1, # "minor": 0, # "revision": 0, # "buildNumber": 1 if [ "$VERSION_MODE" = "" ] ; then VERSION_MODE = "buildNumber" fi cd /path/to/your/git/checkout ...

Set up GIT server in local

Image
If you want to learn GIT, so you can create GIT server in you local system only!! Just download GIT  Install GIT download Tortoise GIT for command GUI & Install it Create folder say GIT_SERVER in your drive Inside that create server repository by > right click > create repository here..  Select check box "Make it bare" as this is server repository where user can't commit directly Make it Bare  Click on OK it will initialise your repository  Git Clone for local repository, Right click > Git Clone Set GIT_Server full path & give local repository name say "GIT_Client" Now add your work/file inside this local/client repository Now it's time to commit your work and move it to server Right click on GIT_Client repository As first time it will prompt you for set user name, email  Set required Information as per blow Click OK, it will prompt the commit window On success commit it will prompt for push! Push your chang...

GIT Commit Push Pull

Image
Using Tortoise GIT  For Taking latest code from server GIT Sync  (It will open GIT sync UI) Stash Save  (it will save your changes to some temp folder) Pull  (It will get latest code into your repo) Stash Pop  (It will bring your changes back to your repo from the temp folder) While doing Stash Pop there may be conflict( ) on some files which is committed by other users, that you need to resolve Now you can start working on latest code  For Commit something GIT Sync  (It will open GIT sync UI) Stash Save  (it will save your changes to some temp folder) Pull  (It will get latest code into your repo) Stash Pop  (It will bring your changes back to your repo from the temp folder) While doing Stash Pop there may be conflict( ) on some files which is committed by other users, that you need to resolve Commit  (It will Open the git commit UI, Select only those files that you want to commit ...