Some useful links.
- Introduction to Git and GitHub for Python Developers | RealPython
- Create gitignore file | toptal.com
- A Guide to Git | blog
- Budges in GitHub README
- Getting started with GitHub Pages - 1
- Getting started with GitHub Pages - 2
- Mastering Markdown
- emoji-cheat-sheet
Git is a distributed version control system (DVCS).
A version control system (VCS) is a set of tools that track the history of a set of files. This means that you can tell your VCS (Git, in our case) to save the state of your files at any point. Then, you may continue to edit the files and store that state as well. Saving the state is similar to creating a backup copy of your working directory. When using Git, we refer to this saving of state as making a commit.
OK, so that’s a version control system. What’s the distributed part? It’s probably easiest to answer that question by starting with a little history. Early version control systems worked by storing all of those commits locally on your hard drive. This collection of commits is called a repository. This solved the “I need to get back to where I was” problem but didn’t scale well for a team working on the same codebase.
$ git init
$ git status
$ git add hello.py
$ git status
$ git commit -m "creating hello.py"
[master (root-commit) 25b09b9] creating hello.py
1 file changed, 3 insertions(+)
create mode 100755 hello.py
$ git status
On branch master
nothing to commit, working directory clean
# .gitignore
__pycache__
.idea
venv
env
.pytest_cache
.coverage
git commit -m "added myname module"
$ git add .gitignore
$ git commit -m "created .gitignore"
$ git log
...
git clone git@github.com:jima80525/github-playground.git
...
git pull
git push origin [branch-name]
git status
– Make sure your current area is clean.git pull
– Get the latest version from the remote. This saves merging issues later.- Edit your files and make your changes. Remember to run your linter and do unit tests!
git statu
– Find all files that are changed. Make sure to watch untracked files too!git add [files]
– Add the changed files to the staging area.git commit -m "message"
– Make your new commit.git push origin [branch-name]
– Push your changes up to the remote.