Skip to content

How to make a side fork

Kreyren edited this page Oct 25, 2019 · 8 revisions

This is stub documentation proceed with care


Sometimes there are proposed merge requests in winetricks that you may need for your wineapp to work that are not yet available in winetricks source. This is a guide how to grab required commits into your side-fork.

TL;DR

  1. fork winetricks
  2. clone in your system
  3. make a new branch from master (git checkout -b my_cool_branch)
  4. fetch references (git fetch)
  5. git cherry-pick

Note that you need a git (https://git-scm.com/) for this process which should be available in all linux distributions.

  1. Fork winetricks
    Since you probably don't have write access to winetricks you need to fork it in your own repository:
image
  1. Clone your repository on your system
    Navigate on your forked repository (which will be present on your profile) and clone it in your local system:
image

Note that for SSH method you need to set up SSH keys: https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh

We recommend cloning in /usr/src/<your_repository> which is defined by File System Hierarchy 3.0 (https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s12.html) as optional directory for source code

Example: git clone <url_here> /usr/src

  1. Make a new branch with your commit aside of master
    We will be 'cherry-picking' commits that are made for master branch on winetricks for this you need to make a new branch using git checkout -b my_cool_branch (replace my_cool_branch with your preffered name) and switch on it using git checkout my_cool_branch.

Note that you should be invoking git commands inside your repository directory or by using git worktree=path checkout -b my_cool_branch

  1. Cherrypicking commits
    For this example we are referencing: https://github.com/Winetricks/winetricks/issues/1280 and assuming that you need a commit from https://github.com/Winetricks/winetricks/pull/1393 which has hotfix for a uninmplemented feature in wine (https://bugs.winehq.org/show_bug.cgi?id=47565)

Navigate on provided merge request and grab commit number from a commit that you want: image

invoke git fetch in case your branch is out of sync with references and followup with git cherry-pick <commit_number_here> which should fetch the required commit in your branch.

You can verify this using git log


Side-notes

Feel free to use https://webchat.freenode.net/#git and ask questions in case you need a help with this process.

If you find something that is missing in this documentation then we encourage you to update it.

Clone this wiki locally