| ▲ | freedomben 3 hours ago | |
I probably could. How does that work with uncommitted changes on the host? Would that be a problem? | ||
| ▲ | rlpb 3 hours ago | parent | next [-] | |
You cannot git push something that is not committed. The solution is to commit often (and do it over ssh if you forget on a remote system). It doesn't need to a presentable commit. That can be cleaned up later. I use `git commit -amwip` all the time. Sure, you might neglect to add a file to your commit, or commit at all, but that's a problem whether you're pushing to a central public git forge or not. | ||
| ▲ | debugnik 3 hours ago | parent | prev | next [-] | |
You'd create a bare git repo (just the contents of .git) on the host with git init --bare, separate from your usual working tree, and set it as a remote for your working trees, to which you can push and pull using ssh or even a path from the same machine. | ||
| ▲ | thwarted 2 hours ago | parent | prev | next [-] | |
If you have ssh access to the remote machine to set up a git remote, you can login to the remote machine and commit the changes that you forgot to commit. | ||
| ▲ | mceachen an hour ago | parent | prev [-] | |
Roughly: `ssh remote "cd $src/repo ; git diff" | git apply` (You'll need to season to taste: what to do with staged changes, how to make sure both trees are in the same HEAD, etc) | ||