Last active
July 15, 2022 16:18
-
-
Save grahamg/04418db28c581df4d4805554a257c9f6 to your computer and use it in GitHub Desktop.
Github Bootcamp Talk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduction to Git and Github at a high level: https://github.com/skills/introduction-to-github | |
0. Installing and configuring git, adding ssh key for use with Github | |
0.1 Mac OS comes pre-installed with git, command line client for interacting with github | |
0.2 Windows requires manual installation, can be obtained from https://git-scm.com/download/win | |
0.3 Using git client on local computer requires adding your ssh key to the github ui. | |
Follow the directions at for adding or creating a SSH key | |
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent | |
1. Starting a new local repository | |
1.1 Navigate to the selected top-level directory containing text to be managed. | |
1.2 git init | |
2. Adding removing files from the staging area | |
2.1 git add <file path> | |
Example: git add main.py | |
3. Commit messages and adding files to a simple linear commit flow | |
3.1 git commit -m 'Commit message that describes what modification has been made to file placed here.' | |
Example: git commit -m 'Added some initial functionality to main.py script.' | |
4. Pushing a set of commits to a designated remote system, the concept of decentralizaed version control | |
4.1 git remote add origin http://IP/path/to/repository | |
Example: git remote add <remote> <remote path via http uri that repository is located> | |
4.2 git push origin master | |
Example: git push <remote to push target branch to> <the target branch name> | |
5. Reverting/rolling-back a previous commit message | |
5.1 'git commit --amend' will go back and edit the most recent commit message. | |
6. Editing and reordering, and organizing previous commits | |
6.1 'git commit rebase -i HEAD~3' will setup an interactive rebase session to edit as many as three commits back within the hsitory. | |
7. Handling merge conflicts and techniques to avoid merge conflicts | |
8. Rebasing commit history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment