liveBook · Manning

GitHub

As explained in Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

GitHub is an online platform for hosting, sharing, and collaboratively managing software repositories.

GitHub is a web-based service for hosting Git repositories and coordinating collaborative software work. A local repository can be connected to GitHub so developers can push changes, clone projects, and share a central codebase. section 19.5

A practical GitHub workflow connects local development with a remote repository:

  • Create a GitHub repository, preferably using the local project’s name. section 19.5
  • Add the GitHub URL as the local repository’s origin remote. section 19.5
  • Push the main branch, then commit and push later changes. section 19.5
  • Fetch or pull updates, or clone an existing repository for local work. section 19.5

Publishing a local project

From C:\MyPSTool, add the remote with `git remote add origin https://github.com/psjamesp/MyPSTool.git`, then run `git push -u origin main`. Git records the remote branch and reports whether the local branch is synchronized. section 19.5

PS C:\MyPSTool> git remote add origin
https://github.com/psjamesp/MyPSTool.git           #1
PS C:\MyPSTool> git push -u origin main            #2
Counting objects: 17, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (17/17), 1.46 KiB | 0 bytes/s, done.
Total 17 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), done.
To https://github.com/psjamesp/MyPSTool.git
 * [new branch]      main -> main
Branch main set up to track remote branch main from origin.

Inspect the complete remote-setup and push transcript, including branch tracking and transfer results. section 19.5

How Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools covers it

How deep it goes
Explains repository creation, remote configuration, pushing, fetching, pulling, and cloning, but defers advanced pull-request workflows.
Examples
Uses the MyPSTool repository, remote commands, status output, push results, and cloning a SharePoint tools repository.
What it assumes
Assumes basic Git and local repository use while reinforcing remotes, branches, commits, and synchronization from practical examples.
What you can do after
Operate GitHub through Git commands to publish, synchronize, and clone software repositories.
How it connects
Ties GitHub to Git, source control, repositories, remotes, branches, cloning, fetching, pulling, and pull requests.

Also explained in

Compare how 8 books explain GitHub →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools. The section links point to the parts of the book it draws on.