I use a private remote repository for two main reasons, backup my work in progress when I travel from the office to home or synchronise code between two development machines.
I have recently started playing with git (coming from hg) and I like the idea of rewriting history. What I found recently is if I do the following
- # do work
- git commit
- git push
- # Fix a little problem with the last commit
- git commit --amend
- git push
There is a conflict with the remote. I need to pull, merge and push again.
- Is there a way to mirror my local changes to the remote repository?
- On my second machine, how do I pull those mirror the remote into my local (preferably without a full clone again)
I know that I'm the only one using it, so I know that no one else will have to deal with a changing history.