blob: ac1cf723c8e284d6c66cd413cf27e77af111c98e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
---
format: rst
toc: no
...
=======================
Git
=======================
Quick tip: when you have ``.gitignore`` ignoring everything (with a ``*``
entry), you need to use ``git-update-index --add FILE`` to actually add the
file, instead of just ``git-add FILE``.
Over HTTP
--------------
To make a repository available over "dumb" HTTP, set up a bare repository and
copy ``hooks/post-update.sample`` to ``hooks/post-update``.
To add links from gitweb, add to the ``@git_base_url_list`` list in the
configuration file.
Copying Files Between Repositories with History
------------------------------------------------
Create a branch with only python files (slow; ignore the very verbose "won't
delete directory" output):
git checkout -b filtered-commits
git filter-branch -f --prune-empty --tree-filter 'find . -not -iname "*.py" -exec rm {} \;' filtered-commits
In the receiving repo:
git pull path/to/source/repo
See also:
http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
http://superuser.com/questions/164362/git-keep-changelog-for-file-when-moving-to-a-different-repository
Color
-------
git config --global --add color.ui true
|