Sign in to follow this  
Pete

Github for Windows

Recommended Posts

Hi folks

I thought I'd post up a quick, basic tutorial of how to get started with Github and not have to learn any of the command line code.

It's still recommended that you learn the basic commands, but this is aimed to help Git newbies like me get their modules on Github with the minimum effort possible.

Check out the PDF below and have fun :)

GitHub for Windows.pdf

  • Like 9

Share this post


Link to post
Share on other sites

Nice Job Pete. Before GitHub for Windows i was using SmartGit, which has more features and power but also can be quite confusing at times. So for my basic needs GitHub for Windows works fine. I would recommend adding a small section about contributing to existing projects. It's not that hard an can be useful, even if all you did was correct some typos or indenting in the PW codebase, like i've done in the past being the coding lightweight that i am. All little things count.

In a nutshell:

Fork

- Go to https://github.com/r...ign/ProcessWire

- Click the "Fork" button in the top-right corner

- Visit your own PW fork page if your not already taken there automatically (https://github.com/MY_USERNAME/ProcessWire)

Clone

- Click "Clone in Windows" in the top-left corner.

- This will open up "GitHub for Windows" and after a short wait you will see a local repo of your fork.Configure remotes

Configure remotes

This allows you keep in sync with changes made to the original codebase (e.g. Ryan's repo)

- In "GitHub for Windows" local repositories view, right-click and choose "open a shell here"

- This will open a shell already in the right directory. Type the following commands:

git remote add upstream https://github.com/ryancramerdesign/ProcessWire.git # Assigns the original repo to a remote called "upstream"
git fetch upstream # Pulls in changes from the original repo not present in your local repository, without modifying your files. Allows you to review first.
git merge upstream/master # merge fetched changes into your working files.

Syncing and pull request

If you've merged upstream changes you can then sync them with your GitHub fork via the 'sync' button.

The same goes for changes you made yourself. If you think PW would benefit from these changes you can send a pull request. Go to your fork on GitHub and click the button "Pull Request".

- out of time -

Anyways, you've put it in pdf but is it an idea to put it on wiki.processwire.com as well?

  • Like 3

Share this post


Link to post
Share on other sites

Thanks Sinnut - will hopefully update this soon.

I did it as a PDF purely because most of my instruction manuals start as a Word document and then get PDF'd, so it's just my workflow. I did originally try to write it on the forums, but there's too little control over what you can do with images without linking them from elsewhere so it ended up as a PDF.

Plus folks can print it out if they like paper copies ;)

Version 1 was purely to get beginners as far as being able to create a repo and commit their code which is the main thing they'll need to do in order to get as many people who write modules/themes etc using it, but your extra steps are the next sensible evolution for the document.

And yes, it should go on the wiki too (which I keep forgetting about :-[).

Share this post


Link to post
Share on other sites

Reviving this old topic..hope this post gets picked up ;)

I have installed Github for Windows and cloned Ryan's PW. Repos have been downloaded and I can browse both the master and dev branches. My issue is that I want to install the dev branch and not the master. I do not know whether the PW filed Git has downloaded to my local folders are the dev or the master branch. When cloning, I made sure I was viewing the dev branch. So, how do I install the dev branch? Thanks.

Share this post


Link to post
Share on other sites

Reviving this old topic..hope this post gets picked up ;)

I have installed Github for Windows and cloned Ryan's PW. Repos have been downloaded and I can browse both the master and dev branches. My issue is that I want to install the dev branch and not the master. I do not know whether the PW filed Git has downloaded to my local folders are the dev or the master branch. When cloning, I made sure I was viewing the dev branch. So, how do I install the dev branch? Thanks.

When you clone a repository you 'get' all the branches that are available. In Github for Windows you can then switch between branches. When you switch to the dev branch the dev branch will be represented on your file system. You can switch branches via these buttons in Github for Windows, if i wanted to switch to master i would simply click on the blue bar that says master:

ghfw.png

When you're behind on commits the sync button will get 'active'. Clicking it will pull in the commits from Ryan's PW repo.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Sinnut! Yeah, it threw me off since I was expecting two repos on my file system - one for dev and one master ;)

Share this post


Link to post
Share on other sites

For me it was very convenient to find TortoiseGit.

It is based upon TortoiseSVN what was forked from TortoiseCVS which I love and use since 8-9 years now. All the TortoiseXXX forks uses the powerful and deep Shell- and WindowsExplorer-Integration from the TortoiseCVS developers. (one more thanks to that guys!)

On the TortoiseGit site there is a link to a download location and a SetupHowTo what tells exactly which version to download and what installation settings are best.

For those who are familiar with TortoiseCVS or TortoiseSVN it maybe simpler to get started with GIT(hub) on windows.

Share this post


Link to post
Share on other sites

If it's Git in general you want to use on Windows (not specifically Github), I would recommend adding SourceTree to your list of software to evaluate. It's free, and works really well with local and remote Git repositories. I use it at home and at work, and find it really easy to use.

  • Like 4

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By BFD Calendar
      I'm still wrestling with the upgrade troubles on OVH.com hosting. I manually upgraded to PW 3.0.98 and Upgrade module 0.0.7. Checking upgrades gives me an "Error loading GitHub branches - https://api.github.com/repos/processwire/processwire/branches - HTTP error(s): 2: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version, 2: fsockopen(): Failed to enable crypto, 2: fsockopen(): unable to connect to ssl://api.github.com:443 (Unknown error) - Check that HTTP requests are not blocked by your server.".
      Upgrading or installing other modules doesn't work either. I know it probably has to do with some provider setting on OVH.com, but I've tried several things mentioned in the ProcessWireUpgrade support forum, all to no avail. Server is configured to use PHP 7.0. If anyone here is also on OVH.com and knows a solution I'd be most happy to hear about it.
    • By FrancisChung
      I stumbled across this on Github ... just breathtaking .... piece of history right there.
      A good place to brush up on your Assembly Language
      https://github.com/chrislgarry/Apollo-11
       
      By the way, Margaret Hamilton who worked on the module is considered a programming genius.
      https://www.wired.com/2015/10/margaret-hamilton-nasa-apollo/
    • By kongondo
      I am trying out multi-instance support in a multi-site setup (option #1, multiple databases) on a Windows Machine (but using a LAMP stack). I am getting a Fatal error in ProcessWire.php #line 877, Failed opening required  '/F:/vhosts/sandpit.dev/wire/config.php' (include_path='.;C:\php\pear') in F:\vhosts\sandpit.dev\wire\core\ProcessWire.php on line 877
      I am using the following API
      $path = "F:/vhosts/sandpit.dev/site-mediamanager/"; // OR // $path = "F:\\vhosts\\sandpit.dev\\site-mediamanager\\"; $url = "http://mediamanager.sandpit.local/"; $site = new ProcessWire($path, $url); Here is Line #877
      require("$rootPath/$wireDir/config.php"); In my code, $path is an absolute path on the windows machine. In the above example, I want ProcessWire to find the /site-mediamanager/config.php, which is a multi-site running off one Wire powered through the main /site/.
      As you can see in the error, ProcessWire is adding an extra forward slash to the path, i.e. 
      '/F:/vhosts/sandpit.dev/wire/config.php' 
      instead of 
      'F:/vhosts/sandpit.dev/wire/config.php' 
      which obviously fails. I have traced the origin to line #784 in ProcessWire.php
      $rootPath = '/' . implode('/', $parts); // remove siteDir from rootPath The pre-pended / causes the error. Remove that and multi-instance works fine in my environment.
      Before I report this as a bug, has anyone ran into this issue? Alternatively, could someone on a Windows machine please test the multi-instance feature for me? Maybe even someone using an absolute path on any machine? Preferably test in a multi-site setup (option #1). If this is a bug, it would be nice if it gets fixed before the imminent master release.
      PW version 3.0.85 (but also tested on the latest dev version).
       
      Thanks.
    • By justb3a
      GithubConnect
      ProcessWire module to connect a Github OAuth application.
      Register a new OAuth application
      Fill in module settings
      Click the Authorize! link to generate code and access token
      There are some predefined endpoints to fetch informations about an user or a repository, get a list of repositories belonging to an organization, fetch content of readme or certain file..
      I used it to choose a repository from a list and import the content (e.g. readme, description) to the corresponding fields.

      Visit the Github Repository to get a full overview.
    • By FrancisChung
      Hi there,
      I have an older Macbook Pro which I'm trying to use as a Desktop Machine for the occasional work-at-home machine.
      I was using Resilio Sync to sync my projects between my main laptop and every time there's a problem with the sync, it seems to delete random files and folders. So anyone using Resilio Sync, think again.
      I would have used rsync but if I recall correctly, I couldn't the get the command to work with my other laptop (rsync wouldn't accept my destination path).  I also have some files I sync between the main laptop and my Windows box, so that was another reason why I opted for Resilio Sync at the time.
      So after spending a few hours recovering my files today, I've decided enough is enough (3rd time it's failed)  and am looking for a new way to sync files between 2 OSX Laptops and a Windows box.

      Anyone have a foolproof, stress-free solution that they use?
      Thanks!