1 This How-To is about the Git repository in Titanium Linux.
2 You will find here useful examples on how to use git in TLD.
5 You need to be a developer to do some of these things.
7 I. How do I commit a new .spec file or package to the repository?
9 1) Clone an empty repository
11 git clone git@git.tld-linux.org:packages/your_new_package
13 2) Set your local Email address
16 git config --local user.email your_git_login@tld-linux.org
18 This step allows you to later push your changes to the server. If you skip this step, your push will fail due to a server-side-hook.
20 3) Put your files into the repository and locally add them
22 <put your files in here>
23 git add file1 file2 files*
26 4) Push your changes to the server
28 git push origin master
30 If you push your changes for the first time of the repositorys "life", you'll need to add the origin to it.
31 After that you'll be fine doing just:
36 It is possible to shorten these commands ex. git add and git commit can be put together into: git commit -a.
37 You can commit several time into you local repository before pushing. You don't need to push each time you commit.
39 II. Crap, I've checked out a repository, forgot to change the local Email address and commited my changes. Now I can't push them to the server. What can I do?
41 This is very unfortunate. Afaik you've got only 2 options.
43 1) Delete your commit. This means all of your changes will be lost, but you can store them elsewhere for the time being, right?
44 To do this (after you backed up your changes) type:
46 git reset --hard HEAD~1
48 the HEAD~1 option tells git to go 1 commit back in the history. Now set your local Email address, put back your changes and commit again. Push should now work as expected.
50 2) The second way is to remove locally your repository and re-clone it. Then put back your changes to it, commit and push.
52 III. My new repository didn't show up on the web.
54 THIS IS FOR git-admins ONLY
56 ssh your_git_login@kraz.tld-linux.org
59 ./scripts/packages_enable_gitweb.sh
61 That's it. Maybe this will get automated some time.