Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

pull requests make it easy to review changes with team mates prior to a merge to master branch

Nice edits! Now that you have changes in a branch off of master, you can open a pull request.

Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red.

As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished.

You can even open pull requests in your own repository and merge them yourself. It’s a great way to learn the GitHub flow before working on larger projects.


Click pull requests tab to open new pull request

...

Quick setup — if you’ve done this kind of thing before

or


Git create new repo and push

Get started by creating a new file or uploading an existing file. We recommend every repository include a README, LICENSE, and .gitignore.

…or create a new repository on the command line

echo "# ebc-chaincode" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Paramount-Software-Solutions/ebc-chaincode.git
git push -u origin main
                

…or push an existing repository from the command line

git remote add origin https://github.com/Paramount-Software-Solutions/ebc-chaincode.git
git branch -M main
git push -u origin main

…or import code from another repository

You can initialize this repository with code from a Subversion, Mercurial, or TFS project.

Import code


Git pull repo to local folder ( vs clone )


Git pull combines a local fetch and merge

Git pull can have issues IF any local files have NOT yet been published to the repo you are pulling from


Simple Git pull from a Github repo using Clone


  1. Delete the local repository
  2. From Github web, login and find the repo and branch to clone
  3. Select Clone 
  4. Select Github Desktop to open
  5. Select the folder to download to
  6. << the clone runs fine
  7. << future pulls from Github Desktop should run fine without complaint unless local files changed


Compare Commits across branches, the same branch

...

https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/reverting-a-commit

Tip: When you revert multiple commits, it's best to revert in order from newest to oldest. If you revert commits in a different order, you may see merge conflicts.


Steps

  1. In Github repo history tab
  2. select the commit to revert
  3. RB menu > Revert this commit