First time pull / clone
- Open git-able command line (e.g., Git Bash, Linux/macOS Terminal or PyCharm through Anaconda)
- Change to the target clone directory
cd "D:/Target/Directory/"
- Clone the desired repository:
git clone https://github.com/USER/REPO
Now is the moment to modify the repository code (add, remove or edit files). After finalizing and testing (push only debugged code to the master branch) new code, go back to the command line to update the repository (add
– commit
– push
):
- Verify the modifications made
git status
- If the status seems OK with consciously made changes, type
git add .
usegit add filename.py
to add single files changes only - best solution: use a local .gitignore file. - Commit changes (be concise , write in past tense)
git commit -m "Leave a message"
git pull --rebase
Got conflict messages? Open concerned files, verify the tagged>>> CODE BLOCKS <<<
, manually delete undesired code (including the>>> <<<
signs) and keep desried code only.git push