git shelving to remote repository
I would like to know if it’s possible to use git with the following workflow:
locally clone a remote repository
- commiting to git repo from a second machine
- GitHub pull request showing commits that are already in target branch
- How can I undo my last git add/commit?
- How does git handle commits in a merge?
- Best code review tool for GIT
- How to amend a commit without changing commit message (reusing the previous one)?
make local changes
commit them locally
save them remotely so as not loose changes and in case I want to continue work on another workstation
go on like this, until the feature is completely finished
then I would like to finally commit it, like if it were a single commit…
I’m talking about shelving, but saving the partial commits to the origin repository
is it possible (or recommend) to work like this with git???
One Solution collect form web for “git shelving to remote repository”
Sure, commit your changes to some named branch, and push that branch to the remote.
When you want to commit as a single commit, you can use
git merge --squash.