Twindle: Documentation: Path to follow for Second Pull Request

Created on 15 Oct 2020  ยท  10Comments  ยท  Source: twindle-co/twindle

For a Second Pull Request, I used a Fork & Branch Workflow mentioned below:

Step 1: Fork the Repository

As you're making your 2nd PR, you already would have so you can skip this step.
For the sake of mentioning here is how you can do that:
Click on the Fork in the top right corner (below your profile icon) on https://github.com/twindle-co/twindle.

Step 2: Make a Local Clone

  • Open Git or any terminal you're using.
  • Type git clone <url of forked repo>
  • It will by default create Git remote as origin
  • cd twindle to enter the cloned repo.

Step 3: Adding a Remote

Syntax: git remote add <remote> <url of original repo>

  • git remote add upstream https://github.com/twindle-co/twindle.git

Note: Git Remote to pull changes from the original repo is upstream here. You can name it anything.
We will need it at a later point.

Step 4: Working In a Branch

1) Create and Checkout

Method 1

  • git branch feature
  • git checkout feature

    OR

Method 2
(shorthand for Method 1)

Syntax: git checkout -b <branch-name>

  • git checkout -b feature

Executing either method creates & switches to the new branch i.e feature.

2) Make changes to the files via any editor of your choice

Any changes made will be in the feature branch not main.

3) Commit those changes

  • git add .
  • git commit -m "<message>"

Step 5: Pushing changes to GitHub

Syntax: git push <remote> <branch>

  • git push origin feature

Step 6: Opening a Pull Request

  • GitHub makes it incredibly easy.
  • Click on Create Pull Request button.
  • Wait for it to be merged.

Step 7: Cleaning Up After a Merged PR

  • git pull upstream main
    Pull changes from the original repo

Note: You need to switch the branch to main before deleting the feature branch (next command)

  • git branch -d feature
    Delete the feature branch locally
  • git push origin main
    Push changes to forked repo > main branch
  • git push origin --delete feature
    Delete the feature branch remotely

Step 8: Keeping your Forked Repo in Sync with the Original Repo

(You need to do this time-to-time to update your Forked Repo > main branch)

  • git pull upstream main
  • git push origin main

OR

you can also do this step as mentioned in #41

documentation

Most helpful comment

good

All 10 comments

There's a typo in step 7 last line
it should be git push origin --delete feature

Good Work ๐ŸŽ‰

Thanks, fixed it! ๐Ÿ‘

Great walkthrough @tusharkandpal :partying_face:

Thanks, @johnjacobkenny ๐Ÿ˜ƒ

good

Awesome, good work!

Great work !

Great !

Awesome @tusharkandpal ๐Ÿ‘

This was referenced in the FAQ document and updated in the PR #201 โœ…

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vasudeveloper001 picture vasudeveloper001  ยท  4Comments

Akshay2996 picture Akshay2996  ยท  6Comments

johnjacobkenny picture johnjacobkenny  ยท  5Comments

johnjacobkenny picture johnjacobkenny  ยท  8Comments

palashmon picture palashmon  ยท  4Comments