-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
home-made Git convenience functions #35
Comments
I know Lleu started working on this, but I'm not so sure its relevant to the project... |
Well of course it's relevant, but only for the hackers. I think it's fine if we just add it into the master branch but don't list it in the user-oriented documentation (as you suggested for the command that walks over all steps necessary for integration). Stuff with parallel branches is bound to get messy. |
The reason I said it wasn't relevant is that its more of a git hack, trying |
I think a more interesting alternative would be to take a look at the hooks git provides in the project/.git/hooks/ directory |
So I've been playing with the 'creto' subcommand you suggested. It is not obvious to me that creating a custom command that accepts input. What I have so far is a command that creates and checks out a new branch called "new_branch." Then the user has to rename the branch to the name he wants with "git branch -m " I don't think this is enough of a simplification to justify its existence. Thoughts? |
I think you're right, that certainly doesn't seem like enough of a simplification. However I'm very sure that you could create a subcommand that accepts additional arguments. Perhaps you could push the experimental code that you've written so far, so we can have a look? |
Git has a friendly feature that enables you to add a new subcommand
bla
(just likecheckout
is the subcommand ingit checkout
) simply by puttinggit-bla
somewhere in yourPATH
(for example$RED_SPIDER_ROOT/bin
). We could exploit that feature to streamline some of the common branch manipulations in our project. In particular I was thinking about the following commands:git puma
( PUll MAster) should be equivalent towithout first switching to a particular branch; one can have valid reasons to merge upstream/master into any branch and it should be harmless in nearly all cases.
git creto <name>
( CREate TOpic) should be equivalent toIn other words, a quick command for everyone who starts working on something new.
git fito <name>
( FInish TOpic) is specific for the situation after a pull request, when your topic branch has been merged into the integration branch but not yet into your local master branch. It should be equivalent to the following "chord":Note that, if for historical reasons
<name>
happens to bemaster
, that branch should of course be retained both on the local repo and on the public fork.More sophistication is possible, for example
git-fito
could default to the current branch if no<name>
is provided. In addition the commands could temporarilycd
to$RED_SPIDER_ROOT
to ensure that the underlying git commands are able to find the repository.The suggested commands aren't meant to be exhaustive, one could probably think up more of them.
The text was updated successfully, but these errors were encountered: