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

Keep main-plugin synced with main #43

Open
Maaack opened this issue Mar 27, 2024 · 3 comments
Open

Keep main-plugin synced with main #43

Maaack opened this issue Mar 27, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@Maaack
Copy link
Owner

Maaack commented Mar 27, 2024

The main-plugin branch should stay synced with the main branch. This is being solved manually. An automated solution would be preferred.

@Maaack Maaack added the help wanted Extra attention is needed label Apr 1, 2024
@Shoghy
Copy link

Shoghy commented Apr 9, 2024

You could try using git hooks, but unfortunately, hooks don't get uploaded to the GitHub repository, or at least the ones stored in the ./.git/hooks directory. However, you could create a .githooks directory and run

git config --local core.hooksPath .githooks/

so git execute the hooks stored in the .githooks directory, but you will need to run that command each time you change of computer.

@Shoghy
Copy link

Shoghy commented Apr 9, 2024

If you're willing to do this, I think you just need to create file called post-commit inside the .githooks directory with the content:

#!/bin/sh
git checkout main-plugin
git merge main
git checkout main

and that should keep main-plugin synced with main, if there is no conflict.

@Maaack
Copy link
Owner Author

Maaack commented Apr 15, 2024

Thanks for the suggestions! I expect I'd need additional logic to switch back to my original branch, or only run the code when merging on main. This should help for merges done on my machine.

Though I do hope there is a solution that would work on GitHub, as I often handle merge requests through the web interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants