国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

GitHub 創(chuàng)建 Pull Request 將代碼提交至別人的倉(cāng)庫(kù)

這篇具有很好參考價(jià)值的文章主要介紹了GitHub 創(chuàng)建 Pull Request 將代碼提交至別人的倉(cāng)庫(kù)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

GitHub 創(chuàng)建 Pull Request 將代碼提交至別人的倉(cāng)庫(kù)

1. Forking the repository

1.1. About forks (關(guān)于 forks)

A fork is a new repository that shares code and visibility settings with the original upstream repository.
A fork 是一個(gè)新的存儲(chǔ)庫(kù),它與原 upstream 存儲(chǔ)庫(kù)共享代碼和可見(jiàn)性設(shè)置。

Forks let you make changes to a project without affecting the original repository, also known as the upstream repository. After you fork a repository, you can fetch updates from the upstream repository to keep your fork up to date, and you can propose changes from your fork to the upstream repository with pull requests. A fork can be owned by either a personal account or an organization.
Forks 可讓你在不影響原始存儲(chǔ)庫(kù) (也稱為 upstream 存儲(chǔ)庫(kù)) 的情況下對(duì)項(xiàng)目進(jìn)行更改。Fork 存儲(chǔ)庫(kù)后,可以從 upstream 存儲(chǔ)庫(kù)獲取更新以使 fork 保持最新?tīng)顟B(tài),并且可以使用 pull requests 將更改建議從 fork 提交到 upstream 存儲(chǔ)庫(kù)。A fork 可由個(gè)人帳戶或組織擁有。

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

When you view a forked repository on GitHub, the upstream repository is indicated below the name of the fork.
查看 GitHub 上 forked 存儲(chǔ)庫(kù)時(shí),upstream 存儲(chǔ)庫(kù)會(huì)顯示在 fork 名稱下方。

fork [f??(r)k]:n. 叉,岔路,耙,路的岔口 v. 分岔,用叉子叉起食物,用叉舉起,在路或河道的岔口轉(zhuǎn)彎
upstream [?p?stri?m]:adv. 逆流,向 (或在) 上游 adj. (石油工業(yè)等) 上游的,溯流而上的

In open source projects, forks are often used to iterate on ideas or changes before incorporating the changes into the upstream repository. If you fork a public repository to your personal account, make changes, then open a pull request to propose your changes to the upstream repository, you can give anyone with push access to the upstream repository permission to push changes to your pull request branch (including deleting the branch). This speeds up collaboration by allowing repository maintainers to make commits or run tests locally to your pull request branch from a user-owned fork before merging. You cannot give push permissions to a fork owned by an organization.
在開(kāi)源項(xiàng)目中,forks 常用于迭代想法或更改,然后將其合并到 upstream 存儲(chǔ)庫(kù)。如果你將一個(gè)公共存儲(chǔ)庫(kù) fork 到你的個(gè)人帳戶,進(jìn)行更改,然后創(chuàng)建一個(gè) pull request,向 upstream 存儲(chǔ)庫(kù)提出你的更改,便可允許對(duì) upstream 存儲(chǔ)庫(kù)具有推送權(quán)限的任何人將更改推送到 pull request branch (including deleting the branch)。

Deleting a fork will not delete the original upstream repository. You can make any changes you want to your fork, and there will be no effect on the upstream. For example, you can add collaborators, rename files, or generate GitHub Pages on the fork without affecting the upstream. After a fork is deleted, you cannot restore the fork.
刪除 fork 不會(huì)刪除原始 upstream 倉(cāng)庫(kù)。你可以對(duì) fork 進(jìn)行任何所需的更改,并且不會(huì)對(duì) upstream 產(chǎn)生任何影響。例如,可以在 fork 上添加協(xié)作者、重命名文件或生成 GitHub Pages,而不會(huì)影響上游。刪除 fork 后,無(wú)法還原該 fork。

1.2. Forking a repository (復(fù)刻倉(cāng)庫(kù))

  1. In the top-right corner of the page, click Fork.

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

  1. Create a new fork
  • Under “Owner”, select the dropdown menu and click an owner for the forked repository. 在 Owner 下,選擇下拉菜單,然后單擊 forked repository 的所有者。
  • By default, forks are named the same as their upstream repositories. Optionally, to further distinguish your fork, in the “Repository name” field, type a name. 默認(rèn)情況下,forks 的名稱與其 upstream repositories 的名稱相同。(可選) 若要進(jìn)一步區(qū)分 fork,請(qǐng)?jiān)?Repository name 字段中鍵入名稱。
  • Optionally, select Copy the DEFAULT branch only. For many forking scenarios, such as contributing to open-source projects, you only need to copy the default branch. If you do not select this option, all branches will be copied into the new fork. (可選) 選擇僅復(fù)制默認(rèn)分支。對(duì)于許多 forking scenarios (例如參與開(kāi)源項(xiàng)目),你只需復(fù)制默認(rèn)分支。如果未選擇此選項(xiàng),所有分支都將復(fù)制到新分支中。

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

  1. Click Create fork.

ForeverStrongCheng / kmeans
github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

2. Cloning your forked repository (克隆復(fù)刻的倉(cāng)庫(kù))

  1. Above the list of files, click Code.

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

  1. Copy the URL for the repository.
  • To clone the repository using HTTPS, click HTTPS.
  • To clone the repository using an SSH key, including a certificate issued by your organization’s SSH certificate authority, click SSH.
  • To clone a repository using GitHub CLI, click GitHub CLI.
  1. Type git clone, and then paste the URL you copied earlier.
$ git clone https://github.com/YOUR_USERNAME/YOUR_FORK.git
yongqiang@yongqiang:~/yongqiang_work$ git clone https://github.com/ForeverStrongCheng/kmeans.git
Cloning into 'kmeans'...
remote: Enumerating objects: 152, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 152 (delta 0), reused 0 (delta 0), pack-reused 151
Receiving objects: 100% (152/152), 36.68 KiB | 417.00 KiB/s, done.
Resolving deltas: 100% (82/82), done.
yongqiang@yongqiang:~/yongqiang_work$
yongqiang@yongqiang:~/yongqiang_work$ cd kmeans/
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
yongqiang@yongqiang:~/yongqiang_work/kmeans$
  1. Change directories to the location of the fork you cloned.
  • To go to your home directory, type just cd with no other text.
  • To list the files and folders in your current directory, type ls.
  • To go into one of your listed directories, type cd your_listed_directory.
  • To go up one directory, type cd ...

3 Configuring Git to sync your fork with the upstream repository (配置 Git 以將 fork 與 upstream 存儲(chǔ)庫(kù)同步)

When you fork a project in order to propose changes to the upstream repository, you can configure Git to pull changes from the upstream repository into the local clone of your fork.
當(dāng)你 fork 一個(gè)項(xiàng)目以向 upstream repository 提出更改建議時(shí),你可以配置 Git 以將更改從 upstream repository 拉到你 fork 的本地克隆中。

  1. Open Git Bash.

  2. Type git remote -v and press Enter. You will see the current configured remote repository for your fork.

List the current configured remote repository for your fork.

$ git remote -v
origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git remote -v
origin  https://github.com/ForeverStrongCheng/kmeans.git (fetch)
origin  https://github.com/ForeverStrongCheng/kmeans.git (push)
yongqiang@yongqiang:~/yongqiang_work/kmeans$
  1. Type git remote add upstream, and then paste the URL your upstream repository and press Enter.

Specify a new remote upstream repository that will be synced with the fork.

$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
  1. To verify the new upstream repository you have specified for your fork, type git remote -v again. You should see the URL for your fork as origin, and the URL for the upstream repository as upstream.

Verify the new upstream repository you’ve specified for your fork.

$ git remote -v
origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
upstream  https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
upstream  https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push)
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git remote add upstream https://github.com/NVIDIA/kmeans.git
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git remote -v
origin  https://github.com/ForeverStrongCheng/kmeans.git (fetch)
origin  https://github.com/ForeverStrongCheng/kmeans.git (push)
upstream        https://github.com/NVIDIA/kmeans.git (fetch)
upstream        https://github.com/NVIDIA/kmeans.git (push)
yongqiang@yongqiang:~/yongqiang_work/kmeans$

4. Syncing a fork (同步復(fù)刻)

Sync a fork of a repository to keep it up-to-date with the upstream repository.

  1. Open Git Bash.
  2. Change the current working directory to your local project.
  3. Fetch the branches and their respective commits from the upstream repository. Commits to BRANCHNAME will be stored in the local branch upstream/BRANCHNAME.
    upstream 倉(cāng)庫(kù)獲取分支及其各自的提交。 對(duì) BRANCHNAME 的提交將保存在本地分支 upstream/BRANCHNAME 中。

Fetch the project branches from the upstream repository

$ git fetch upstream
  1. Check out your fork’s local default branch - in this case, we use master.
$ git checkout master
  1. Merge the changes from the upstream default branch - in this case, upstream/master - into your local default branch. This brings your fork’s default branch into sync with the upstream repository, without losing your local changes. If your local branch didn’t have any unique commits, Git will perform a fast-forward.
    upstream 默認(rèn)分支 (在本例中為 upstream/master) 的更改合并到本地默認(rèn)分支中。這會(huì)使復(fù)刻的默認(rèn)分支與 upstream 倉(cāng)庫(kù)同步,而不會(huì)丟失本地更改。

Merge the upstream counterpart into your local master

$ git merge upstream/master
or
$ git rebase upstream/master
  1. Update your fork on GitHub with any changes from the upstream master
$ git push origin master
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git fetch upstream
From https://github.com/NVIDIA/kmeans
 * [new branch]      master     -> upstream/master
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git push origin master
Username for 'https://github.com': chengyq116@163.com
Password for 'https://chengyq116@163.com@github.com':
Everything up-to-date
yongqiang@yongqiang:~/yongqiang_work/kmeans$

Syncing your fork with the upstream repository

$ git fetch upstream
$ git rebase upstream/master

5. Making and pushing changes (創(chuàng)建和推送更改)

Before making changes to the project, you should create a new branch and check it out. By keeping changes in their own branch, you follow GitHub Flow and ensure that it will be easier to contribute to the same project again in the future.
在對(duì)項(xiàng)目進(jìn)行更改之前,應(yīng)創(chuàng)建新的分支。通過(guò)將更改保留在在自己的分支中,可以遵循 GitHub 流,并確保它將來(lái)再次為同一項(xiàng)目做出貢獻(xiàn)會(huì)更容易。

Creating a branch (創(chuàng)建分支)

$ git branch BRANCH-NAME
$ git checkout BRANCH-NAME
or
$ git checkout -b <feature_branch_name>

When you’re ready to submit your changes, stage and commit your changes. git add . tells Git that you want to include all of your changes in the next commit. git commit takes a snapshot of those changes.
當(dāng)您準(zhǔn)備好提交更改時(shí),請(qǐng)暫存并提交更改。git add . 告訴 Git 你希望在下一次提交中包含所有更改。git commit 會(huì)拍攝這些更改的快照。

$ git add .
or
$ git add <file1> <file2>

$ git commit -m "a short description of the change"
or
$ git commit -s

Note:

$ git add -p
$ git add --patch

Interactively choose hunks of patch between the index and the work tree and add them to the index. This gives the user a chance to review the difference before adding modified contents to the index.
交互式地選擇 the index and the work tree 之間的補(bǔ)丁塊并將它們添加到索引中。這使用戶有機(jī)會(huì)在將修改的內(nèi)容添加到索引之前查看差異。

This effectively runs add --interactive, but bypasses the initial command menu and directly jumps to the patch subcommand.

You can now push your local changes to your forked repository

$ git push origin <feature_branch_name>
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git branch
* master
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git checkout -b yongqiang
Switched to a new branch 'yongqiang'
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git branch
  master
* yongqiang
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ vim README.md
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git diff
diff --git a/README.md b/README.md
index 517638b..7927c0b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-kmeans
+k-means
 ======

 A simple kmeans clustering implementation for double precision data,
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git status
On branch yongqiang
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git add .
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git status
On branch yongqiang
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   README.md

yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git commit -m "a short description of the change"
[yongqiang 9cf098e] a short description of the change
 1 file changed, 1 insertion(+), 1 deletion(-)
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git push origin yongqiang
Username for 'https://github.com': chengyq116@163.com
Password for 'https://chengyq116@163.com@github.com':
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 295 bytes | 98.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote:
remote: Create a pull request for 'yongqiang' on GitHub by visiting:
remote:      https://github.com/ForeverStrongCheng/kmeans/pull/new/yongqiang
remote:
To https://github.com/ForeverStrongCheng/kmeans.git
 * [new branch]      yongqiang -> yongqiang
yongqiang@yongqiang:~/yongqiang_work/kmeans$
$ git commit --amend
$ git push origin yongqiang -f
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git commit --amend
[yongqiang 8cd312b] Refine the README.md file
 Date: Sun Apr 16 23:21:08 2023 +0800
 1 file changed, 1 insertion(+), 1 deletion(-)
yongqiang@yongqiang:~/yongqiang_work/kmeans$
yongqiang@yongqiang:~/yongqiang_work/kmeans$ git push origin yongqiang
Username for 'https://github.com': chengyq116
Password for 'https://chengyq116@github.com':
To https://github.com/ForeverStrongCheng/kmeans.git
 ! [rejected]        yongqiang -> yongqiang (non-fast-forward)
error: failed to push some refs to 'https://github.com/ForeverStrongCheng/kmeans.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
yongqiang@yongqiang:~/yongqiang_work/kmeans$

yongqiang@yongqiang:~/yongqiang_work/kmeans$ git push origin yongqiang -f
...
yongqiang@yongqiang:~/yongqiang_work/kmeans$

6. Opening a pull request in GitHub

Now that you’ve created and pushed changes to a feature branch in your forked repository, you can now open a pull request from which you created your fork.

  1. master branch

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

  1. yongqiang branch

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

  1. Open a pull request

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

  1. Create pull request

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

  1. Close pull request

github如何提交代碼到別人倉(cāng)庫(kù),Git - GitHub - Gerrit,GitHub,創(chuàng)建,Pull Request,將代碼提交至別人的倉(cāng)庫(kù)

7. Updating a pull request

In the local branch you are working from, you may add additional commits and re-push as documented above. This will automatically add the new commits to the pull request and CI checks will be re-triggered.
在你工作的本地分支中,你可以添加額外的提交并重新推送,如上文所述。這將自動(dòng)將新提交添加到 pull request 中,并且將重新觸發(fā) CI 檢查。

You could amend the original commit and force push it back to your remote origin:

$ git add <file1> <file2>
$ git commit --amend
$ git push origin <feature_branch_name> -f

The pull request will be updated accordingly and CI checks will be re-triggered.

8. Cleaning up local and remote feature branches (清理本地和遠(yuǎn)程功能分支)

git branch -d <feature_branch_name>
git push --delete origin <feature_branch_name>

References

https://yongqiang.blog.csdn.net/

GitHub Contributions
https://hyperledger-fabric.readthedocs.io/zh_CN/latest/github/github.html
Getting started with GitHub documentation
https://docs.github.com/en/get-started

https://codex.so/fork-and-pull-en文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-672763.html

到了這里,關(guān)于GitHub 創(chuàng)建 Pull Request 將代碼提交至別人的倉(cāng)庫(kù)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Git使用教程,本地與遠(yuǎn)程(Github)倉(cāng)庫(kù)提交代碼

    Git使用教程,本地與遠(yuǎn)程(Github)倉(cāng)庫(kù)提交代碼

    學(xué)會(huì)如何利用git來(lái)管理代碼 Git簡(jiǎn)單來(lái)說(shuō)就是代碼版本控制系統(tǒng),通過(guò)他可以進(jìn)行多人開(kāi)發(fā)同一個(gè)項(xiàng)目然后講每個(gè)人的代碼塊合并完成一個(gè)大項(xiàng)目,還能控制代碼版本記錄等。Git四個(gè)區(qū)域 工作區(qū):處理工作的區(qū)域(即做項(xiàng)目打代碼的區(qū)域) 暫存區(qū):已完成的工作臨時(shí)存放區(qū)域

    2024年02月03日
    瀏覽(109)
  • GIT常用操作整理(從本地創(chuàng)建倉(cāng)庫(kù)到提交到GitHub全流程)學(xué)習(xí)筆記

    GIT常用操作整理(從本地創(chuàng)建倉(cāng)庫(kù)到提交到GitHub全流程)學(xué)習(xí)筆記

    1. 本體和插件下載 官網(wǎng): GIT Download下載 安裝過(guò)程中一路默認(rèn)即可。 終端輸入 查看git安裝是否成功。 (可選)然后下載一個(gè) Git 狀態(tài)顯示到 powershell 中的非常好用插件,posh-Git(windows): 用管理員身份打開(kāi) powershell ,之后輸入 重啟 powershell 初始化倉(cāng)庫(kù)的文件位置會(huì)加一個(gè)

    2024年04月28日
    瀏覽(26)
  • 使用TortoiseGit拉取(clone)、提交代碼至托管倉(cāng)庫(kù)(GitLab、GitHub、Gitee)

    使用TortoiseGit拉取(clone)、提交代碼至托管倉(cāng)庫(kù)(GitLab、GitHub、Gitee)

    以GitLab為例,假設(shè)我們要拉取GitLab上如下路徑的代碼: Step 1: 獲取代碼倉(cāng)庫(kù)路徑 Step 2: 新建文件夾 在本地新建文件夾用于放置拉取的程序文件等: Step 3: Git clone設(shè)置 選擇代碼倉(cāng)庫(kù)路徑復(fù)制到URL,同時(shí)設(shè)置拉取文件的保存位置即Directory。此外,根據(jù)實(shí)際情況選擇要拉取的代碼

    2024年02月02日
    瀏覽(131)
  • github創(chuàng)建倉(cāng)庫(kù)和拉取代碼

    github創(chuàng)建倉(cāng)庫(kù)和拉取代碼

    目錄 一、git創(chuàng)建倉(cāng)庫(kù) 第一步:首先登錄github 第二步:進(jìn)入建立的倉(cāng)庫(kù)(或者新建倉(cāng)庫(kù)) ?第三步:創(chuàng)建成功 第四步:在本地新建一個(gè)文件夾,然后在文件夾下打開(kāi)git bash 第五步:在git bash命令框執(zhí)行g(shù)it init命令初始化項(xiàng)目 第六步:將當(dāng)前文件夾和遠(yuǎn)程的git項(xiàng)目對(duì)應(yīng)起來(lái) ?第七

    2024年02月06日
    瀏覽(27)
  • 【git】github 如何同步別人的倉(cāng)庫(kù)

    假設(shè)你有兩個(gè) Git 倉(cāng)庫(kù) ,并希望同步它們,以便它們含有相同的內(nèi)容。 你必須要在 Git 中配置一個(gè)遠(yuǎn)程服務(wù)器指向上游的倉(cāng)庫(kù)地址,這樣你在 fork 中的更改才能同步到原始的倉(cāng)庫(kù)里。這樣也能把原始倉(cāng)庫(kù)中的變更同步到 fork 里。 打開(kāi)終端,進(jìn)入本地項(xiàng)目的工作目錄。 查看你

    2024年02月10日
    瀏覽(50)
  • 利用github創(chuàng)建倉(cāng)庫(kù)并且上傳代碼,簡(jiǎn)單易學(xué)

    利用github創(chuàng)建倉(cāng)庫(kù)并且上傳代碼,簡(jiǎn)單易學(xué)

    預(yù)備工作:注冊(cè)github賬戶,安裝配置Git bash 1.登錄github賬戶,點(diǎn)擊 右上角加號(hào)-New repository創(chuàng)建倉(cāng)庫(kù) ,根據(jù)提示信息輸入 倉(cāng)庫(kù)名稱(我命名為Repetition-code)以及描述 , 勾選public 以及 Add a Read...,至此倉(cāng)庫(kù)創(chuàng)建完成 ?2.登錄gitbash,克隆剛剛新建的倉(cāng)庫(kù),代碼如下: (2)找到克隆倉(cāng)

    2024年02月11日
    瀏覽(26)
  • GitHub上傳自己的代碼、倉(cāng)庫(kù)創(chuàng)建和倉(cāng)庫(kù)的刪除(詳細(xì)過(guò)程)

    GitHub上傳自己的代碼、倉(cāng)庫(kù)創(chuàng)建和倉(cāng)庫(kù)的刪除(詳細(xì)過(guò)程)

    已經(jīng)成功安裝了Git 已經(jīng)成功注冊(cè)了GitHub賬號(hào) 參考鏈接: Git上傳文件代碼到GitHub 如何在GitHub上傳自己的項(xiàng)目 如何將本地項(xiàng)目上傳到Github (1) 在GitHub的主頁(yè)下創(chuàng)建倉(cāng)庫(kù)的相關(guān)設(shè)置 (1) 創(chuàng)建一個(gè)新的空文件夾(文件夾的創(chuàng)建地方和命名根據(jù)自己需要),此文件夾處命名為

    2024年02月07日
    瀏覽(27)
  • github上clone下來(lái)別人倉(cāng)庫(kù)的源碼,如何推送到自己的倉(cāng)庫(kù)

    github上clone下來(lái)別人倉(cāng)庫(kù)的源碼,如何推送到自己的倉(cāng)庫(kù)

    前提:對(duì)方項(xiàng)目開(kāi)源,未有密鑰 原文 如果你clone下來(lái)一個(gè)別人的倉(cāng)庫(kù),在此基礎(chǔ)上完成你的代碼,推送到自己的倉(cāng)庫(kù)可能遇到如下問(wèn)題: error: remote origin already exists.表示遠(yuǎn)程倉(cāng)庫(kù)已存在。 因此你要進(jìn)行以下操作: 1、先輸入 git remote rm origin 刪除關(guān)聯(lián)的origin的遠(yuǎn)程庫(kù) 2、關(guān)聯(lián)

    2024年02月16日
    瀏覽(35)
  • 【Python程序開(kāi)發(fā)系列】聊一聊github的pull request幾種合并方式

    【Python程序開(kāi)發(fā)系列】聊一聊github的pull request幾種合并方式

    ? ? ? 在正常的工作流程中,PR 用于將一個(gè)分支的更改合并到另一個(gè)分支,而這些更改通常以提交的形式存在。每個(gè)提交都有一個(gè)唯一的提交 ID,用于標(biāo)識(shí)和跟蹤更改的歷史。因此一般情況下PR包含源分支的多個(gè)commit提交記錄(pr_commit_ids),也有可能不包含任何commit。 ? ?

    2024年02月20日
    瀏覽(24)
  • 如何從 GitHub 上克隆一個(gè)倉(cāng)庫(kù)、進(jìn)行修改、提交并上傳回 GitHub 新手保姆級(jí)教程

    如何從 GitHub 上克隆一個(gè)倉(cāng)庫(kù)、進(jìn)行修改、提交并上傳回 GitHub 新手保姆級(jí)教程

    如果你的電腦上沒(méi)有安裝Git,你首先需要下載并安裝它。你可以在Git官網(wǎng)上找到安裝程序。(注:如果官網(wǎng)上下載緩慢 解決方法1 開(kāi)個(gè)加速器 解決方法2 去鏡像網(wǎng)站下載) 鏡像網(wǎng)站地址?CNPM Binaries Mirror? 不知道下哪個(gè)版本好可以選這個(gè)版本 并根據(jù)自己電腦位數(shù)選擇 對(duì)應(yīng)紅框

    2024年01月17日
    瀏覽(22)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包