1 This little howto is about Git repository used by Titanium Linux.
2 You will find here examples of most often used git commands.
4 Ready? Let's start (you must have RW access to TLD git repositories).
6 ==============================================================================
7 1. How do I commit a new .spec file or package to the repository?
9 a) Clone an empty repository (note: it will be automatically created on server
12 git clone git@git.tld-linux.org:packages/your_new_package
14 b) Set your local Email address
17 git config --local user.email your_git_login@tld-linux.org
19 This step allows you to later push your changes to the server. If you skip
20 this step, your push will fail due to a server side hook.
22 c) Put your files into the repository and add them locally
24 git add file1 file2 files*
27 d) Push your changes to the server
29 If you push your changes for the first time of the repositorys "life", you'll
30 need to add the origin to it.
32 git push origin master
34 After that you'll be fine by doing just:
40 It is possible to shorten these commands ex. git add and git commit can be put
41 together into: git commit -a. You can commit several times into your local
42 repository before pushing all changes to server. You don't need to push each
43 time you commit, but feel free to do so if you want :-)
45 ==============================================================================
46 2. Crap, I've checked out a repository, forgot to change the local e-mail
47 address and commited my changes. Now I can't push them to the server.
50 This is very unfortunate. AFAIK you've got only 2 options.
52 a) Delete your commit. This means all of your changes will be lost, but you
53 can store them elsewhere for the time being, right?
55 To do this (after you backed up your changes) type:
57 git reset --hard HEAD~1
59 the HEAD~1 option tells git to go 1 commit back in the history. Now set your
60 local e-mail address, put back your changes and commit again. Push should now
63 b) The second way is to remove locally your repository and re-clone it. Then
64 put back your changes to it, commit and push.
66 ==============================================================================
67 3. My new repository didn't show up on the web.
69 Repository "packages" is checked every 15 minutes for new subrepositories by
70 cron job. If found, they're added to the web. If for some reason cron job will
71 fail ask one of git admins to run and/or fix this script:
73 ~git/scripts/packages_enable_gitweb.sh
75 Top level repositores must be manually added to gitweb. Ask one of gitadmins
78 ssh your_login@kraz.tld-linux.org
80 cd ~/repositories/repo_name.git
81 touch gitweb-export-ok
83 ==============================================================================
84 4. I've deleted some files in my cloned repo. I'm doing git pull, but they
87 Please do following in your cloned repo to restore deleted files:
89 git checkout some.file
92 ==============================================================================
93 5. How can I add description for new repository?
97 ssh git@git.tld-linux.org setdesc packages/some_package "Some description"