Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 947 Bytes

git_advanced-3.md

File metadata and controls

36 lines (27 loc) · 947 Bytes

Git Advanced III

Author: alpha74


Forking:

  • It is a feature of Git hosting website.
  • It means : Copying a remote repo to our own online account.
  • Both are remote repo.
  • upstream repo is considered the source of truth .
  • Can be used to create a new source of truth .

Pull Requests:

  • It is a feature of Git hosting sites.

  • Goal is to merge a branch into project.

  • Enable team communication.

  • Need not edit the PR if new commits are added.

  • Single Repo PR:

    • A remote repo and its clone is needed.

    • Steps:

      • Create a topic branch from base branch locally.
      • Work and push to remote repo using git push --set-upstream origin topic.
      • A PR will be created.
    • git push -d origin <topic>: Deletes topic branch from remote repo.

  • Multi Repo PR:

    • A remote repo and a fork is needed.

    • Steps:

      • Fork the upstream repo.
      • Create a branch.
      • Create a PR.