Incore session on Git and GitHub.
- What is Git?
- What is GitHub?
- Importance of Github
- What is a remote repository?
- What is a local repository?
- Basic Commands:
- git init
- git add
- git commit
- git push
- git pull
- git status
Live Demo
- Create a Repository
- Add collaborators (groups of 2)
- Clone the repository
- Open the repository on VSCode
- Make changes to the repository (target.md).
- Pull the changes made by others.
- Push to remote repository
- Other Useful Commands:
- git branch (concept, Forks)
- git checkout
- git remote (concept)
- git merge
- git reset
- git diff
Live Demo
- Merge conflict demonstration
- Fork main repository
- Clone the Forked repository
- Create a branch and checkout to that branch
- Push the branch (--set-upstream)
- Checkout to master and merge the new branch
- Push to master
- Add remote to main repository
- Pull from main repository
- Make Pull Requests
- Setup:
- Personal Information: git config
- Ignore: .gitignore
- What's .md (Markdown)?
- Pull Requests
- Issues
- Community Convention:
Check this for reference
* Description (and Tags)
* README
* CONTRIBUTING
* PULL REQUEST TEMPLATES
* ISSUE TEMPLATES
* CODE OF CONDUCT
* LICENSE
Most frequently used commands:
Structure: git <operation> <options> <parameters>
Help: git --help
git init
git add . OR git add <file/folder-names>
git commit -m "message"
git pull
git push
git branch <branch-name>
git checkout <branch-name>
git merge <branch-name>
git branch -d <branch-name>
git branch -D <branch-name>
git diff
git log
git status
git fetch
git remote add <remote-name> <url>
git remote rm <remote-name>
git stash
git stash clear
git reset HEAD
git reset ^HEAD
git reset --hard