Talk:Using Git
From OpenSimulator
Anyone use Git Extensions for Windows? Supposedly integrates with Windows Explorer. Haven't used it myself, though, but thought I'd mention it for anyone seeking alternatives. --DaveCoyle 02:03, 5 August 2009 (UTC)
HOW-TO Create GIT# - r# DATESTAMP for OpenSim
WINDOWS:
CREATE a BATCH File called GIT_ver.bat on your desktop.
COPY the contents as shown below into it and save the file.
INSTRUCTIONS are explained in <span style="background-color: navy; color: white" />the header of <span style="background-color: navy; color: white" />the batch file. You will have to create a text file "revtag.sh" and insert <span style="background-color: navy; color: white" />the command line as shown in <span style="background-color: navy; color: white" />the header of <span style="background-color: navy; color: white" />the batchfile.
Good Luck and Enjoy have your GIT# & R# displayed in your OpenSim Server & Client
@echo off
::
:: FILENAME: GIT_Ver.bat
:: AUTHOR: WhiteStar Magic @ OSGrid
:: DATE: September.13.2009
:: REVISION: 0.1 (initial release)
::
:: DESCRIPTION:
:: - GENERATES Git# & Revision Stamp for Opensim.
:: - creates the .version file in the /bin directory
::
::
:: INSTALLATION:
:: - place this on your desktop for easy access
:: - ensure that you have the CORRECT LOCATION defined in the OS_GIT_REPO vaiable below.
:: !!! Example Structure as I use it.
:: C:\OpenSim_GIT <--- Top Directory where the SH file is created
:: C:\OpenSim_GIT\bin <--- where the bin directory is located
:: !!! This must run from the ONE directory above where \bin is located !!!
:: - CREATE A TEXT FILE called revtag.sh in your OS_GIT_REPO
:: -- Place this following line EXACTLY into it.
:: echo `git show-ref --tags | tail -1 | sed -e 's,^\(.......\).*/,\1 - r,'` `git log -n 1 --pretty='format:%ci'` > bin/.version
::
:: DEPENDENCIES:
:: - Installation of GIT TOOLS Windows Installation as per http://opensimulator.org/wiki/Using_Git
:: !! I installed these two packages as recomended and used the default installations for them
:: - http://msysgit.googlecode.com/files/Git-1.6.4-preview20090730.exe
:: - http://code.google.com/p/tortoisegit/
::
:: ==== SET YOUR GIT REPO HERE ====
set OS_GIT_REPO=c:\OpenSim_GIT
:: ================================
:: Appending Path to access all binaries used by GIT
::
PATH = C:\Program Files\Git\bin;%PATH%;
echo %PATH%
::
@echo on
cd %OS_GIT_REPO%
::
sh.exe revtag.sh