forkgit is a git wrapper that enables Fork to:
- open and interact with remote git checkouts over SSH
- set a custom
.git
directory for specific checkouts
Known issues with remote checkouts:
- removing untracked files doesn't work
- interactive rebase is not working
- not tested at all on Windows and thus unlikely to work there
See also fork-dev/Tracker#929.
-
Clone this repository.
-
For each git checkout on the remote server, create a directory locally and create a file
.gitfork
inside with these contents (replacing values within<>
):remote-host = <remote machine's hostname> remote-root = <absolute path to git checkout on the remote machine>
-
In the Fork Git preferences, add this repository's
bin/git
as a custom git instance. -
Open the directories that represent the git checkouts on the remote machine in Fork.
To speed up interaction with remote checkouts, you can configure SSH multiplexing
for the server. This involves setting ControlPath, ControlMaster and ControlPersist
in your ~/.ssh/config
for the host you're connecting to. See the OpenSSH Wikibook
for more information.
This is useful when you want to track your dot-files in a git repository, but don't want command-line git to know that your home directory is a git checkout.
To set this up:
-
Run
git init
in your home directory. -
Rename the generated
.git
directory to.dotfiles.git
. -
Create a
.forkgit
file in your home-directory with these contents:git-dir = .dotfiles.git
-
Open your home directory in Fork.
You will want to create a .gitignore
file to ignore most of the files in your
home directory to make this workable. For example:
*
!.*
!/.config/**/*
!/.ssh/config
.DS_Store
.bash_history
.cache/
.lesshst
.python_history
.viminfo
.wget-hsts
.zsh_history
.Xauthority