How to work with Git and GitHub...
- Distributed version control system
- Free and open source
- Works for small and huge projects
- Supports local repositories and servers
- Want to learn all the details? Free, online book...
- We will use GitHub
Homework: Create a GitHub profile if you do not already have one
- Use an alias if you don't want you real name online
- Let me know your alias via email
- Public repositories via GitHub Classroom for homeworks
- You commit the code
- I add comments and issues
- Private repositories for exams
- Download and install Git...
- Git command line
- Visual Git tools; examples:
- Initialize a local Git repository
- Tracking changes
- Working with remotes
- Setup and configure GitHub account
Command | Description |
---|---|
git init | Create an empty Git repository or reinitialize an existing one |
git clone | Clone a repository into a new directory |
git pull | Fetch from and integrate with another repository or a local branch |
git add | Add file contents to the index |
git commit | Record changes to the repository |
git log | Show commit logs |
git push | Update remote refs along with associated objects |
git status | Show the working tree status |
git config | Get and set repository or global options |
Command | Description |
---|---|
git branch | List, create, or delete branches |
git checkout | Switch branches or restore working tree files |
git merge | Join two or more development histories together |
git stash | Stash the changes in a dirty working directory away |
git remote | Manage set of tracked repositories |
git reset | Reset current HEAD to the specified state |
- Git Basics exercise
- Follow the GitHub Flow to add your lightning talk subject to Online Course Calendar
- Fork the project.
- Create a topic branch from master.
- Add your subject to course calendar.
- Commit your changes to your topic branch.
- Push this branch to your GitHub project.
- Open a Pull Request on GitHub.
- Discuss, and optionally continue committing.
- The project owner merges the Pull Request.