Source Control Management

Version 45 (Sickboy, 02/09/2009 12:41)

1 1 Sickboy
h1. SCM
2 1 Sickboy
3 1 Sickboy
Please click "Wiki" in the menu above for generic dev-heaven site help
4 15 kju
5 22 Sickboy
*GENERAL NOTE* This wiki is based on the "Exception" rule. Please leave settings/configuration options default, unless it is explicitly listed to do otherwise.
6 22 Sickboy
7 15 kju
{{>toc}}
8 1 Sickboy
9 14 kju
h2. Private and Public Key Files
10 2 Sickboy
11 1 Sickboy
To connect to a dev-heaven.net ssh host, you must authenticate with a private/public key combination.
12 1 Sickboy
Please follow the following steps.
13 1 Sickboy
14 1 Sickboy
h3. Installation
15 1 Sickboy
16 35 Sickboy
* Install "Putty Suite":http://tartarus.org/~simon/putty-snapshots/x86/putty-installer.exe
17 37 Sickboy
* Create a Key Set with PuttyGen
18 33 Sickboy
* Save the PUBLICkey and PRIVATEkey somewhere safe on your harddrive
19 35 Sickboy
* Send PUBLICkey to admin (Guard the PRIVATEkey with your life, never share! :D)
20 36 Sickboy
** The admin will give your account the permission to the right project, and supply you with the git clone url
21 1 Sickboy
22 1 Sickboy
h3. (After any reboot) if you want to access a dev-heaven.net ssh host:
23 1 Sickboy
24 1 Sickboy
* Load your PRIVATEkey into the PageAnt application (Part of putty suite). 
25 38 Sickboy
_Incase you have a password on the PRIVATEkey, you will have to enter this everytime pageant loads your key_
26 34 Sickboy
* You are recommended to add a link to autostart with the param(s) to you key file(s).
27 7 kju
28 7 kju
<pre>
29 41 kju
D:\Programme\Putty\pageant.exe "D:\Programme\Putty\my_private_key.ppk"
30 7 kju
</pre>
31 1 Sickboy
32 34 Sickboy
h3. First time connecting to a host:
33 1 Sickboy
34 9 kju
** Open a connection with putty, to the host (e.g: git.dev-heaven.net) *DO NOT* save it!
35 1 Sickboy
*** Click YES/Accept to accept the server key
36 1 Sickboy
*** Close Putty again
37 34 Sickboy
** You should only have to do this once per host
38 1 Sickboy
39 1 Sickboy
40 45 Sickboy
h1. GIT
41 1 Sickboy
42 27 Sickboy
This is the beginners guide, feel free to look at the "expertguide":Git_Install_Expert
43 27 Sickboy
44 45 Sickboy
h2. Installation of the Core Client (MSysGit)
45 20 Sickboy
46 24 Sickboy
* (Make sure the Putty suite is installed, see top of page)
47 40 Sickboy
* Install "MSysGit":http://dev-heaven.net/projects/list_files/heaven (*Fixed Edition!* Please lookup the latest available version)
48 1 Sickboy
** It is recommended to add the Windows Explorer Extensions ("Git Gui Here", "Git Bash Here")
49 1 Sickboy
** Choose to install for *Windows Command Line* (Middle option, out of 3)
50 1 Sickboy
** Choose to use *Plink for SSH*
51 44 Sickboy
52 45 Sickboy
h2. Installation of the Interface Client(s)
53 44 Sickboy
54 45 Sickboy
h3. TortoiseGit
55 44 Sickboy
56 44 Sickboy
This client is basically TortoiseSVN but then for Git, and is very much alike the SVN version
57 44 Sickboy
58 44 Sickboy
* http://code.google.com/p/tortoisegit/downloads/list
59 44 Sickboy
60 45 Sickboy
h3. Git GUI
61 44 Sickboy
62 44 Sickboy
This is part of the MsysGit Installation, *more info here*: http://dev-heaven.net/wiki/heaven/Git_Gui_Guide
63 44 Sickboy
64 45 Sickboy
h3. Git Extensions
65 44 Sickboy
66 44 Sickboy
This client is a bit like Tortoise's client, but operates a bit differently and has a few unique features
67 28 Sickboy
* Install "Git Extensions":http://downloads.sourceforge.net/gitextensions/GitExtensions137Setup.msi?use_mirror=
68 1 Sickboy
** If you install the *Complete* Setup, please *do not* install the included MSysGit with it!!
69 1 Sickboy
** Choose to install KDiff (Only available in *Complete* Setup). You can also download & install this application seperately (google)
70 1 Sickboy
** Incase of 64-bit Windows (otherwise skip this step!), if you also want to use the Extensions in 32-bit applications (like Total Commander);
71 1 Sickboy
*** also download the .zip file
72 1 Sickboy
*** unpack the GitExtensionsShell.dll
73 33 Sickboy
*** rename it to GitExtensionsShellEx32.dll
74 39 Sickboy
*** place it in your Git Extensions installation folder
75 1 Sickboy
*** regsvr32 GitExtensionsShellEx32.dll from a dos prompt
76 1 Sickboy
* *Please Reboot*
77 1 Sickboy
* Startup the Git Extensions application, and verify that all settings are filled in. (Local Settings tab can remain empty)
78 1 Sickboy
** UserName
79 1 Sickboy
** E-mail
80 1 Sickboy
** Application Locations
81 1 Sickboy
** Favorite Editor and Diff/Merge program
82 1 Sickboy
83 14 kju
*more info here:* http://dev-heaven.net/wiki/20/GitExtensions_QuickStart
84 44 Sickboy
85 1 Sickboy
86 45 Sickboy
h2. Initial Steps
87 45 Sickboy
88 1 Sickboy
* Please make sure your keyAgent (e.g Pageant) is running, and your private key is loaded
89 1 Sickboy
* Use interface or cli git: git clone git@git.dev-heaven.net:REPOSITORYNAME.git  (Receive repository name from admin)
90 10 kju
** In case of message: "The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is.", press y.
91 1 Sickboy
92 1 Sickboy
93 45 Sickboy
h2. JumpStart
94 1 Sickboy
95 1 Sickboy
* In Git, you have a local copy of the repository
96 1 Sickboy
* If you commit, you only commit to your local repository. If you want to push your changes to the shared remote repository, you must first git pull, and then git push
97 1 Sickboy
* If you wish to fetch, you use git pull
98 1 Sickboy
* If there are things to merge, like changes to files by 2 persons, use git merge
99 9 kju
* every git command can be used with --help for basic help output
100 1 Sickboy
101 1 Sickboy
* If you wish to look at the log using the GIT Gui on your repository, you can check the Repository Menu, and Visualize master's history (or all branches)
102 1 Sickboy
* First useful "git cheat sheet":http://cheat.errtheblog.com/s/git/
103 1 Sickboy
* "Subversion commands in git ":http://git.or.cz/course/svn.html
104 1 Sickboy
105 45 Sickboy
h2. Git use
106 1 Sickboy
107 45 Sickboy
h3. Staging and Committing Changes
108 1 Sickboy
109 1 Sickboy
* If you have Git Extensions installed and properly setup, you can right click a repository and choose "Git Extensions" -> "Browse"
110 1 Sickboy
** You can use this tool to browse the repository+history
111 1 Sickboy
** You can use the "Commit" option in this tool to stage your changes and commit. It works pretty handy with the rescan changes button and other options
112 1 Sickboy
113 45 Sickboy
h3. Reverting Uncommitted Changes
114 1 Sickboy
115 1 Sickboy
* By using the Git Extensions: Browse. Then Commit
116 1 Sickboy
* If your file is already stage, unstage it
117 1 Sickboy
* Right click the file in the top file list, and choose revert changes
118 1 Sickboy
* There are more ways, like hard resetting to current head: git checkout -f (Or in the Commit dialog of Git Extensions: reset changes hard), however, this will revert ALL your currently uncommitted changes
119 1 Sickboy
120 45 Sickboy
h2. Common problems
121 6 kju
122 6 kju
<pre>
123 6 kju
Access denied
124 6 kju
FATAL ERROR: Server sent disconnect message
125 6 kju
type 2 (protocol error):
126 6 kju
"Too many authentication failures for git"
127 6 kju
</pre>
128 6 kju
129 6 kju
Usually happens when pageant aint running.
130 6 kju
Or when you installed msysgit without pointing it to putty plink.
131 6 kju
132 11 kju
<pre>
133 11 kju
You asked me to pull without telling me which branch you
134 11 kju
want to merge with, and 'branch.master.merge' in
135 11 kju
your configuration file does not tell me either.  Please
136 11 kju
name which branch you want to merge on the command line and
137 11 kju
try again (e.g. 'git pull <repository> <refspec>').
138 11 kju
See git-pull(1) for details on the refspec.
139 11 kju
140 11 kju
If you often merge with the same branch, you may want to
141 11 kju
configure the following variables in your configuration
142 11 kju
file:
143 11 kju
144 11 kju
    branch.master.remote = <nickname>
145 11 kju
    branch.master.merge = <remote-ref>
146 11 kju
    remote.<nickname>.url = <url>
147 11 kju
    remote.<nickname>.fetch = <refspec>
148 11 kju
149 11 kju
See git-config(1) for details.
150 11 kju
</pre>
151 11 kju
152 17 Sickboy
Use: git pull origin master
153 18 Sickboy
(or push)
154 18 Sickboy
155 17 Sickboy
Or setup the mentioned settings (execute from your repository folder):
156 18 Sickboy
<pre>
157 17 Sickboy
git config branch.master.remote origin
158 23 Sickboy
git config branch.master.merge refs/heads/master
159 17 Sickboy
git config remote.origin.url git@git.6thsense.eu:REPOSITORYNAME
160 23 Sickboy
git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
161 18 Sickboy
</pre>(replace REPOSITORYNAME with the right repository, e.g test-mod.git)
162 1 Sickboy
163 1 Sickboy
164 1 Sickboy
h2. Info
165 1 Sickboy
166 42 Sickboy
* DevHeaven Git Discussion: http://dev-heaven.net/boards/1/topics/show/15
167 1 Sickboy
* Git: http://git-scm.com/
168 17 Sickboy
* Git <-> SVN Linked together: http://flavio.castelli.name/howto_use_git_with_svn
169 2 Sickboy
* Why Better: http://whygitisbetterthanx.com/
170 1 Sickboy
* GitFaq: http://git.or.cz/gitwiki/GitFaq
171 1 Sickboy
* GitHub: http://www.github.com
172 1 Sickboy
* Gitorious: http://gitorious.org/
173 1 Sickboy
* GitEnabled Pastebin: http://gist.github.com
174 1 Sickboy
* http://peepcode.com/products/git
175 1 Sickboy
* http://jfcouture.com/category/git/
176 43 Sickboy
* http://blog.carlmercier.com/2008/01/25/no-nonsense-git-part-1-git-remote-branch/
177 24 Sickboy
* http://github.com/webmat/git_remote_branch
178 24 Sickboy
179 24 Sickboy
h2. Experimental Clients
180 24 Sickboy
181 24 Sickboy
* "NetBeans Git Plugin":http://www.nbgit.org (This is only a wrapper, you still require a Git Implementation (MSYS/CygWin))
182 1 Sickboy
183 45 Sickboy
h1. Subversion (SVN)
184 1 Sickboy
185 1 Sickboy
* Please make sure your keyAgent (e.g Pageant) is running, and your private key is loaded
186 1 Sickboy
* DevHeaven Url: svn.dev-heaven.net
187 1 Sickboy
188 2 Sickboy
h1. Virtual Folders / Working with Repositories in ArmA
189 1 Sickboy
190 1 Sickboy
* Vista mklink: http://itsvista.com/2007/03/mklink/
191 1 Sickboy
* http://en.wikipedia.org/wiki/NTFS_junction_point
192 1 Sickboy
* http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html