- How do I undo a pushed commit (like if it had never happened)?
- For sysadmins - How do I remove a remote tag accidentally created?
- I'm doing my first code contribution to GNOME, when I "git push", I get "fatal: the remote end hung up unexpectedly"
- How do I get a plain text file of all GNOME repositories?
- How do I create a personal WIP branch?
Old GNOME-specific Frequently Asked Questions (with answers) about Git.
How do I undo a pushed commit (like if it had never happened)?
Update: this section is outdated as GNOME moved from git.gnome.org to GitLab
So if you only want to revert the last commit, do:
git reset --hard HEAD^ git push --force origin
For sysadmins - How do I remove a remote tag accidentally created?
Fixme: is this still relevant here, and for GitLab?
git push --exec=force origin :tagname
I'm doing my first code contribution to GNOME, when I "git push", I get "fatal: the remote end hung up unexpectedly"
Update: mentions bugzilla, GitLab is now used.
To push patches directly to a code repository you must have commit access and a Git account. If you don't have a Git account (and thus not commit access) ask the maintainer in same Bugzilla report where you sent the patch to commit the patch for you, if the maintainer have not done so.
How do I get a plain text file of all GNOME repositories?
Update: dead link.
Use the file https://gitlab.gnome.org/repositories.txt. We use this e.g. to keep the commits-list topics up to date.
How do I create a personal WIP branch?
Update: this section is outdated as GNOME moved from git.gnome.org to GitLab.
git.gnome.org has a convention allowing personal WIP (work-in-progress) branches to be created, following the naming scheme:
where $username is your gnome.org nickname or username, and $branch_name is the descriptive name of the branch.
Any branch prefixed with ‘wip/’ allows force-pushes, so you may rewrite history on a WIP branch as much as you like.
The intention for allowing these branches is to standardize how people create personal branches of others’ modules. Note that you do not need the module maintainer’s permission to create such a branch — branches are cheap. Please delete personal branches once they are obsoleted or merged, however.
Maintainers may create project-wide WIP branches following the scheme:
These do require maintainer approval to push, but since they are WIP branches, also allow force-pushes.