Skip to content
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

post status_update hooks #76

Open
mattmartini opened this issue Jul 5, 2024 · 3 comments
Open

post status_update hooks #76

mattmartini opened this issue Jul 5, 2024 · 3 comments

Comments

@mattmartini
Copy link

I am using got to maintain a configuration utility on multiple machines. It is a great improvement on my workflow.

After I do a git update_status (or git pull in the old methodology) I need to run make so that the makefile in my utility will combine machine-specific configs with generic ones. It would also be useful to run install inside my .fzf dir after updating.

Is there a way to do post hooks?

@genehack
Copy link
Owner

Is there a way to do post hooks?

There's no explicit hook support at the moment.

I think if I was going to try to do something like you describe, the way I would do it is to write a small shell script that encapsulates the logic you want, and then use got do to run that script across whatever set of repos where you want this behavior. The context that the script runs in will get scoped to each repo in turn. As an example, I periodically do this to clean up local copies of branches that have been deleted on the remote:

got do -e "git remote prune origin"

Does that seem viable?

@mattmartini
Copy link
Author

Yes, I think this will work. The script can live on the servers remotely and be activated by the got script. It should be tailored to each repo as the script run will be different for different repos (A configuration repo vs a development one,...)

@mattmartini
Copy link
Author

mattmartini commented Sep 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants