Github is a web-based version control tool that uses the Git technology. It allows for unlimited public repositories and is used by individuals and enterprises to host code and collaborate on documentation and issues tracking. Github allows for cloning repositories, branching, committing changes, pulling requests to share code, and merging code branches into the master branch. Common commands used with Github include git init, git clone, git pull, git branch, git checkout, git status, git add, git commit, and git push.
2. Github
Github is a web-based version control tool which internally makes use
of Git technology. It is a free and open source distributed version
control system designed to handle everything from small to very large
projects with speed and efficiency. It offers unlimited public repos.
GitHub is used by individuals and enterprises to host code, collaborate
on documentation and track issues.
3. Github
What git do??
● Version control software - while yo coding you can save each
little time you want to change
● Open source
● Download - git-scm.com
6. Github
Download & Install
1. Download the latest Git for Mac installer.
2. Follow the prompts to install Git.
3. Open a terminal and verify the installation was successful by
typing git --version:
7. Github
Download & Install
4. Configure your Git username and email using the following
commands, replacing Emma's name with your own.
8. Github - Workflow
● Branching - create a replica without affecting Master
● Commit - making set of changes
● Pull request - to show other people help to share code
● Collaborate - get comments to make changes
● Merge - merge help to merge code with the master
9. Github - Workflow
For open source
● Fork - exact replica of repository on york account
● Why? - permission access
● How - create fork
- github flow
- open pull request
10. Github
What is ‘working locally’?
git clone is a Git command line utility which is used to target an
existing repository and create a clone, or copy of the target
repository. ... Cloning a local or remote repository.
Cloning a bare repository. Using shallow options to partially clone
repositories. Git URL syntax and supported protocols.
11. Github
Commands
git init - create a new local repository
git clone “httpS://github.com/usernam/rpositorye”- Check out a
repository, Create a working copy of a local repository:
git pull - bringing down the changes made by your partner
git branch- create a branch on local machine
git checkout- check that branch that we are on a specific branch
12. Github
Commands
git status - List the files you've changed and those you still need to
add or commit
git add - Add files, Add one or more files to staging (index)
git commit -m - Commit changes to head (but not yet to the remote
repository)
git commit -a - Commit any files you've added with git add, and also
commit any files you've changed since then
git push origin master - Send changes to the master branch of your
remote repository
13. Github
Commands
git remote add origin <server> - If you haven't connected your local
repository to a remote server, add the server to be able to push to it
git remote -v - List all currently configured remote repositories
git merge <branchname> - To merge a different branch into your
active branch
14. Github
What is commit???
40 character SHA-1 Hash
Include :-
Blobs
Metadata
Basically git commit "records changes to the repository" while git push
"updates remote refs along with associated objects".