28th-Jun-2020, skillplot - mangalbhaskar
-
Do you need to collaborate with a team or other open source projects?
-
Do you want to publish your code for others to use and collaborate with them?
-
Do you want to take control of your documentation content, course material, blog articles that you write once and publish anywhere?
-
Do you want to write the book, articles, blog, course-ware, and collaborate with others?
-
Do you want to automate the software development and content publishing?
-
Do you want simple, less maintenance overhead and free hosting web site?
-
github is a Git repository hosting service, but it adds many of its own features.
-
At the heart of github is Git, an open source project started by Linux creator Linus Torvalds. github
-
version control system
-
Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel
-
A staggering number of software projects rely on Git for version control, including commercial projects as well as open source
-
Distributed architecture, Git is an example of a DVCS (hence, Distributed Version Control System)
3 Key Flagship features: Fork, pull request, merge
-
fork / forking - create a copy of a repository from other user’s account to your account
-
This enables you to take a project that you don’t have write access to and modify it under your own account
-
pull request - allows you to share the changes for the forked repo by sending the notification to the parent repo/owner
-
merge request - allows to take the change request from other users to their repo
-
Original owner of the parent repo can then, with a click of a button, merge the changes you requested from the forked repo for his original repo
-
-
You had to manually download the project’s source code
-
Make your changes locally
-
Create a list of changes called a "patch"
-
And then e-mail the patch to the project’s maintainer
-
The maintainer would then have to evaluate this patch, possibly sent by a total stranger, and decide whether to merge the changes
-
network effect starts to play a role in github
-
When you submit a pull request, the project’s maintainer can see your profile, which includes all of your contributions on github. If your patch is accepted, you get credit on the original site, and it shows up in your profile
-
It’s like a resume that helps the maintainer determine your reputation.
-
publicly discussed.
-
-
ML based code scanner, security
-
Other offers and services for individuals, organizations and enterprise
-
Individual repos
-
Organization repos
-
Private and public repos
-
Collaborators, Transfer ownerships
-
DevOps - Actions - automation, triggers
-
Content Publishing - books in markdown, asciidoc formats, LMS
-
Issue/Bug Tracker, inbuild wiki, statistics/insight - lines of code, total commits etc.
-
Static Web-site hosting directly from text files for individual or repo specific
-
Web-hooks for auto updating repo - can be used as LMS
-
Contribution to the other Open source project
-
Collaboration with others for your Open source project, more than one person can be the code owner
-
Credit to individual contributors, appears on the project contributor list
-
Communication - issues, documentations, wikis, project web-site
-
Catalog - insights, stats - code frequency, traffic, contributors, commits, dependency graph, forks, network
-
bitbucket is alternative to github
-
mercurial (hg) is alternative to
git
Github documentation is the best resource to follow the instructions step-by-step: Getting Started With github. Following instructions gives you the quick summary, for details follow the github documentation.
-
Install git for windows from gitforwindows.org. This installs git and other linux like utilities, text editors. It is around
~45MB
git --version
-
Or, Install github desktop for windows from desktop.github.com. This installs github Desktop UI along with git. It is around
~88MB
. github Desktop is only available for only for Windows and Mac OS. For Linux there are other GUI applications.-
If you have installed git with
github desktop
and wantgit
command to be accessible from the command prompt, then add the following to the windowsPATH
environment variable. Change the<UserName>
and<Version>
to the appropriate values based on your system and installation detailsC:\Users\<UserName>\AppData\Local\GitHubDesktop\app-<Version>\resources\app\git\cmd # once it's configured git can be accessed from command prompt git --version
-
-
Install using apt repository
sudo apt install git git --version
-
Clone the public repository and start using it locally
git clone https://github.com/skillplot/getting-started-with-github.git
Warning
|
Change the remote github repo url: https://github.com/skillplot/getting-started-with-github.git to your repo URL
|
-
Create account / sign-up on github
-
Create the new repo (git repo) on:
-
Using Github desktop - create new git repo locally and publish it on github website - this is straight forward; just follow the instructions in the UI.
-
Or, directly on github website and then create git repo locally using
git
command line tool and publish it on github website
-
-
Initialize the individual code repo
echo "# getting-started-with-github" >> README.md git init git add README.md
-
configure username and emailID
TipUse individual git repo specific configurations settings either in personal or shared systems as you may want to use different git/github accounts for different projects. git config user.name "yourname" git config user.email "[email protected]"
-
commit the local changes, add the github remote repo URL and push the changes to the master branch
git commit -m "first commit" git remote add origin https://github.com/skillplot/getting-started-with-github.git git push -u origin master
NoteRecommended to create these files at the root of the project directory: README.md
,LICENSE
, and.gitignore
-
-
Change directory to the root of the project codebase directory. Initialize it as git repo, add, commit and push the changes to the github.
git init git add -A git commit -m"first cut files" git remote add origin https://github.com/skillplot/getting-started-with-github.git git push -u origin master
-
Importing old repo to new repo using github website UI, github import
-
Path environment variable on powershell:
$env:PATH