OD_Library/Github/Github_Workflow.md

10 KiB
Raw Permalink Blame History

####Before any of the steps below, please install Github's Desktop Client to your local machine....


##Download (pull) from Cloud...Make Change...Upload (push) to Cloud

If you own the repo or have permissions to modify the repo you would like to make changes to, you can do the following steps. If you do not, please follow the steps in the section called Forking a Repo. After which you can do the following steps.

  1. From the Github Desktop client, click on the to clone the specific repo to your local machine...(fyi...some repos will take awhile to download, the first time)



  2. Choose the directory (folder) you wish to clone this repository to.
    • (Word of caution: be caution of cloning the repo inside a Dropbox folder (or similar), as unfortunately the two don't play nicely with each other.)



  3. Navigate via Windows to this newly created folder or right click on the repo name in the Github Client and 'Open in Explorer'





  4. Add file(s), and/or open and modify any file that you need.
    • Dont change a blob file (examples: .rvt, .dwg, .psd, etc.) that you know someone else is working on. If you dont know, ask on the Github issues, if you can work on a particular file.
    • For Markdown (.md) or any similar plain text files, you don't have to ask, as these can be developed concurrently in a distributed manner, and merged together at a later date. This is where the power of Github really comes into play. See Making Changes to a Markdown File section below.



  5. Go back to the Github client and fill in the summary and description' (optional) per the following example, and then click 'Commit to master'



  6. then click , which will push these changes to the Github cloud.

If you'd like to push this change to the original repo you forked from, you can follow the Make Pull Request section below


Forking a Repo

  1. If you want to make a change to a repo that you don't own (or do not have permissions to change) you'll have to the repo to your own account...



    After which, it's cloned to...



  2. At this point you can follow Download (pull) from Cloud...Make Change...Upload (push) to Cloud section above

##Making Changes to a Markdown File

You can modify the Markdown (.md) file one of the following two ways.

Method (1)

  1. Go to the repo site on Github. Navigate through the list of files/folders and click on the markdown(.md) file you'd like to modify.

  2. Click on icon

  3. Edit the file in the space below...



    flip to the enter image description here to see how the markdown file is rendered...



  4. Once changes are made, fill in the following and 'commit changes'...

Method (2)

  1. You can also edit the Markdown file from a multitude of Markdown editors. Showing how popular this format has become, here's an exhaustive list of both web-based and desktop-based editors you could use. My favorite is StackEdit.



  2. After saving and making your changes, go to Step 5 in the Download (pull) from Cloud...Make Change...Upload (push) to Cloud section above to commit your changes and pushing them to the cloud.

##Syncing file changes down from the Github cloud and viewing the 'diff' between versions.

  1. Go to the Github Client and click on as seen below...



    After syncing, the changes or history of commits will be viewable here. The text highlighted in green below shows what was added. The text highlighted in red shows what was deleted or changed...



    You can also go to the github website to see the history of changes and diffs between file versions. Click on 'commits' below...



    From the list, click on the commit or versions you'd like to see the diff on....



    The text highlighted in green below shows what was added. The text highlighted in red shows what was deleted or changed...


Make Pull Request

If you'd like to push a change to a repo you forked from, do the following. The user, however, who owns the repo (or has permssions) has to accept the pull request. See Accepting the Pull Request below.

  1. List item



  2. After clicking on you will see the following



    The left pull down menu...

    ...is where the changes are going, the right menu....

    ...is where the changes are coming from.

  3. Leave optional comment. If everything looks okay click on




Accepting the Pull Request

  1. By clicking on the tab you can see a list of pull requests. After which click on the pull request you'd like to accept.

  2. Click on 'Merge pull request'...



  3. The 'confirm merge'...


Pulling changes from another repo

  1. To view if there's any other additional changes in any of the other related cloned repos go to --> As you can see from the network graph below, osciawilson's repo had (1) change ahead of the OpeningDesign repo...



  2. Go to the repo you wish to pull the changes from and click 'New pull request'...



  3. If nothing appears for comparison, click on 'compare across forks'



    Should look something like this...



    The left pull down menu...

    ...is where the changes are going, the right menu....

    ...is where the changes are coming from.

  4. Fill in the following and click on 'Create pull request'...



  5. click on 'Merge pull request'...

    enter image description here

  6. click on 'Confirm merge'...

    enter image description here