Open mattmartini opened 3 months ago
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?
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,...)
John
Yes, it would be fine to have the ability to launch a local script after the update was completed. Something you could designate in .gitgotrc
Matt
On Jul 30, 2024, at 12:47 AM, John SJ Anderson @.***> wrote:
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?
— Reply to this email directly, view it on GitHub https://github.com/genehack/app-gitgot/issues/76#issuecomment-2257453439, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAM6OU4CIQGRGCO35FJZPTZO4LGHAVCNFSM6AAAAABKNL62BKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJXGQ2TGNBTHE. You are receiving this because you authored the thread.
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
(orgit pull
in the old methodology) I need to runmake
so that the makefile in my utility will combine machine-specific configs with generic ones. It would also be useful to runinstall
inside my.fzf
dir after updating.Is there a way to do post hooks?