H. R. LEPROFESSEUR  SUBJECTS  SHOP

 SUBJECTS } LINUX } Version control: git useful commands

Sept 6, 2023.

1. Clone from repository: git clone $GIT_REPOS/ip ip-`date +%Y%b%d-%H%M`

2. List tags: git log –tags –simplify-by-decoration –pretty=’format:%ci %d’

3. Find difference between tags: git diff tags/ip-21ww06g tags/ip-21ww07g

4. Find difference between tags, print file name only: git diff –name-only tags/ip-21ww06g tags/ip-21ww07g

5. Print necessary information: git status

6. Add files: git add path of file

7. Commit changes: git commit -m "comments"

8. Take changes from other repository: git pull other-repository-directory-path

9. Create a new branch and swith to it: git branch -b new_branch_name

Please leave a short message for errors, comments or anything else: hr@Leprofesseur.org