Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 1.46 KB

README.MD

File metadata and controls

43 lines (35 loc) · 1.46 KB

Workflow working with fork and remote repo

  1. Create own GitHub-Repository

  2. Search for foreign GitHub-Repository and fork it within GitHub

  3. git clone own GitHub-Repository which was created with the fork action in GitHub


    $ git clone https://github.com/USERNAME/REPONAME.git
    $ cd REPONAME
  1. Create and add connection to foreign GitHub-Repository. Typically this is named as upstream. Your own GitHub-Repository is stored as orgin.
  2. Connect foreign GitHub-Repository with lokal git project

    $ git remote add upstream https://github.com/ANDERER_USER/ORIGINALREPO.git
    # Check remote connections
    $ git remote -v
  1. To pull data from the foreign repo add tracking info git branch -u The command -u is the same as --track
 
    # Create remote connections for pull
    $ git branch -u upstream/master
    # Check remote connections
    $ git branch --all
    # Checkout remote 
    $ git fetch upstream
    $ git pull
    #Alternativ: $ git merge
  1. Make your changes and add it to your GitHub-Repository
  
    $ git add file
    $ git commit -m "message"
    $ git push origin main
  1. Create an PR within Github to transfer changes to the foreign GitHub-Repository
  2. Waiting for approval and merge in the foreign repository
  3. Fetch and merge changes back to your repoistory