git-fork

Git workflow for maintaining a derivative fork

别来无恙 提交于 2021-02-06 09:55:11
问题 Overview I have a project that is a customisation of an existing FOSS product. Its getting to the point where we're maintaining a long-term fork rather than applying new plugins and the like. I'd like some input on what the sanest workflow for maintaining this project might be. Criteria We should be able to send pull requests / patches upstream easily The project needs to track from tagged releases, and may be updated to newer releases as part of our own release workflow. Needs to have its

Manually create a Git fork

断了今生、忘了曾经 提交于 2020-12-29 09:13:10
问题 If I understand forking, it conceptually involves the following steps: Mirror-clone the source repo to a target repo Set an "upstream" remote on the target repo, pointing to the source repo Some other stuff, like email subscriptions, etc. (not important for this question) This is how it looks like: Original <──upstream─── Forked (server) (server) ↑ │origin │ (local) The key difference from cloning is that these steps are server-side , not local. How do I replicate this manually, on the git

In GitLab's CI/CD system how do I prevent a job from running if it's in my fork and only allow it to run if its a merge to the main repo?

杀马特。学长 韩版系。学妹 提交于 2020-12-06 12:52:09
问题 I have a job in my gitlab-ci.yml like build and push: stage: push only: - master script: - gcloud docker -- push $IMAGE_TAG The idea being that it should only run if the branch is master, but I also only want it to run if the repo is app/ and not dave/ The docs say The repository path can be used to have jobs executed only for the parent repository and not forks: job: only: - branches@gitlab-org/gitlab-ce but I can't get this to work. If our gitlab server is gitlab.myco.io and the app is app

Git good practices to keep a forked project up-to-date with its source origin when both are evolving

扶醉桌前 提交于 2020-12-03 11:43:25
问题 Context I'm the main author of Next Right Now which is an open source "boilerplate" containing several "presets" of building a web app using the Next.js framework. Each preset comes with built-in features and is meant to be forked so other can build their app based on it. Each preset lives in its own git branch, such as: https://github.com/UnlyEd/next-right-now/tree/v2-mst-aptd-at-lcz-sty https://github.com/UnlyEd/next-right-now/tree/v2-mst-aptd-gcms-lcz-sty I'm working on NRN and making it

Forking Git repository from GitHub to GitLab

不打扰是莪最后的温柔 提交于 2020-11-30 02:10:46
问题 Suppose that I would like to implement a fix to a project of someone else. That project resides on GitHub. I could create a fork on GitHub and implement the fix. However, I would like to create my fork on GitLab rather than on GitHub. Is that possible? How? I have read this article: https://about.gitlab.com/2016/12/01/how-to-keep-your-fork-up-to-date-with-its-origin/ Anyway, I am not sure what should I do in my case. Should I just create a fork on GitLab of the project from GitHub somehow? Or

Forking Git repository from GitHub to GitLab

陌路散爱 提交于 2020-11-30 02:08:15
问题 Suppose that I would like to implement a fix to a project of someone else. That project resides on GitHub. I could create a fork on GitHub and implement the fix. However, I would like to create my fork on GitLab rather than on GitHub. Is that possible? How? I have read this article: https://about.gitlab.com/2016/12/01/how-to-keep-your-fork-up-to-date-with-its-origin/ Anyway, I am not sure what should I do in my case. Should I just create a fork on GitLab of the project from GitHub somehow? Or

Syncing fork with upstream: git fetch + git checkout + git merge vs. git checkout + git pull

微笑、不失礼 提交于 2020-08-10 18:21:47
问题 The documentation at Github-Help: Syncing a Fork shows three commands to keep my GitHub fork in sync with the upstream repo. git fetch upstream git checkout master git merge upstream/master Can I use the following two commands instead of the above three? git checkout master git pull upstream/master Are the two sets of commands equivalent, or are there differences between them? 回答1: These command sets are not equivalent. git pull is split into two commands: git fetch git merge The problem is,

Syncing fork with upstream: git fetch + git checkout + git merge vs. git checkout + git pull

流过昼夜 提交于 2020-08-10 18:21:38
问题 The documentation at Github-Help: Syncing a Fork shows three commands to keep my GitHub fork in sync with the upstream repo. git fetch upstream git checkout master git merge upstream/master Can I use the following two commands instead of the above three? git checkout master git pull upstream/master Are the two sets of commands equivalent, or are there differences between them? 回答1: These command sets are not equivalent. git pull is split into two commands: git fetch git merge The problem is,

How to get a list of all forks of a GitHub repo on Linux?

大兔子大兔子 提交于 2020-08-10 17:51:11
问题 I would like to have a simple, non-interactive way to get a list of forks of a GitHub repo. For me personally, it has to run on at least Linux. 回答1: Using GraphQL (GiHub API v4) from a bash script, using cURL: #!/bin/bash # Returns a list of all forks of a github repo. # See the output of "$0 -h" for more details. set -e # initial default values access_token="" repo_owner=$USER repo_name=$(basename $(pwd)) res_file=res.json function print_help() { echo "Returns a list of all forks of a github

How to get a list of all forks of a GitHub repo on Linux?

流过昼夜 提交于 2020-08-10 17:51:06
问题 I would like to have a simple, non-interactive way to get a list of forks of a GitHub repo. For me personally, it has to run on at least Linux. 回答1: Using GraphQL (GiHub API v4) from a bash script, using cURL: #!/bin/bash # Returns a list of all forks of a github repo. # See the output of "$0 -h" for more details. set -e # initial default values access_token="" repo_owner=$USER repo_name=$(basename $(pwd)) res_file=res.json function print_help() { echo "Returns a list of all forks of a github