Skip to content

Manage floating commits a little easier

License

Notifications You must be signed in to change notification settings

simonklee/git-float

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

git-float

What is this?

git-float is a script to help manage "floating commits". That is commits that you keep rebasing locally and are not meant for upstreaming or just not ready yet.

Using git pull -r git will automatically rebase local commits after pulling the latest changes. However when you want to push some commits you first need to rebase your commits to move the floating commits last, and then find the SHA of the last non-floating commit that is ready to be pushed before doing

git push origin <SHA>:master

This process is where git-float will help you.

How to use git-float

Mark your floating commits with the prefix float! in the commit header. Enter your local git reposity, and type

/path/to/git-float -i

This will install a filter that automatically moves floating commits to the end of the list when doing git rebase -i. It will also install a pre-push hook that prevents you from pushing floating commits, and if you do it will find the last non-floating commit SHA and suggest you use

git push <remote> <SHA>:<remote branch>

instead.

If you no longer want to use git-float, just do

/path/to/git-float -u

to uninstall the hooks again.

Licence

git-float released under GPLv2 or later to be compatible with git.

About

Manage floating commits a little easier

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%