3 # We don't want (for now) to work with .git in nonstandard locations.
4 #readonly REPOCONFIGDIR="$(git rev-parse --git-dir)"
6 readonly REPODIR
="$(git rev-parse --show-toplevel)"
9 # GITCONFIG/master branch in our main working repo (origin)
10 # should hold the config prepared for saving and restoring
11 # (i.e., no junk commits).
12 if [[ ! -e .git
/refs
/heads
/GITCONFIG
/master
]]; then
15 echo $
"Don't know where to pull from:"
16 echo $
"your main repo has no GITCONFIG/master"
17 echo $
"and you haven't given a remote name as an arg!"
21 git fetch
-v "$1" GITCONFIG
/master
22 # We expect this to be done manually otherwise.
23 git branch GITCONFIG
/master
"$1"/GITCONFIG
/master
29 if [[ -d .git
]]; then
30 # Already initialized.
31 # Please, add and commit interesting files beforehand manually,
32 # otherwise merge will fail.
41 git stash
--include-untracked
42 # Pulling from GITCONFIG/master in origin:
43 # (We have set up such behavior in our gitgitconfig-init.)
44 git pull
--rebase -v --no-edit
45 # Our local modifications remain ontop of the previously saved config.
48 # We'll see how merging works out.