Skip to content

Ecohydraulics/how2git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

A cooking recipe for using git

First time pull / clone

  1. Open git-able command line (e.g., Git Bash, Linux/macOS Terminal or PyCharm through Anaconda)
  2. Change to the target clone directory
    cd "D:/Target/Directory/"
  3. 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 (addcommitpush):

  1. Verify the modifications made
    git status
  2. If the status seems OK with consciously made changes, type
    git add .
    use git add filename.py to add single files changes only - best solution: use a local .gitignore file.
  3. Commit changes (be concise , write in past tense)
    git commit -m "Leave a message"
  4. 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.
  5. git push

In case of fire Image: Louis-Michel Couture on Github

Releases

No releases published

Packages

No packages published