Skip to navigation
"push a new head" in Git for gitlab
30.03.26
"push a new head" in Git for gitlab 1. In your gitlab find the hash for the commit you like end your main branch, than reset to this commit ``` git reset --hard 14e80a0a ``` 2. In your gitlab under Settings>Repository>Protected branches => Allow to force bush 3. Then back at commandline repository push it with force ``` git push origin main --force ``` tags: newhead
https://panjeh.medium.com/git-reset-hard-fbcd6c34b6c9
Reply
Anonymous
Information Epoch 1775865631
Files are bags of bytes.
Home
Notebook
Contact us