כמה פקודות:
להפוך ספריה מקומית ל-git repository:
git init
לשכפל git repository מרוחק אל המחשב שלך:
git clone <url> (example: ssh://
[email protected]/hubuser/repository)
לבדוק את המצב הנוכחי:
git status
לראות באיזה branch אתה נמצא ואילו branchים קיימים:
git branch
ליצור branch חדש:
git branch my_new_branch
לבחור את ה-branch הנוכחי:
git checkout my_new_branch
להכין קבצים ל-commit:
git add <file name>
להכין קובץ שנמחק ל-commit:
git add -u
לעשות commit:
git commit
למרג'ג' שינויים מ-branch אחר:
git merge source_branch_name
לראות repositories מרוחקים:
git remote
להוסיף remote חדש:
git remote add remote_name <url>
לטעון (מטא) מידע של repository מרוחק:
git fetch remote_name
לראות רשימה של ה-branchים של ה-remoteים:
git branch -r
ליצור branch מקומי מ-branch של repository מרוחק:
git branch new_local_branch_name remote_name/branch_name
למרג'ג' שינויים מקומיים אל תוך repository מרוחק:
git push remote_name local_branch_name:remote_branch_name
למרג'ג' שינויים ב-repository מרוחק אל תוך ה-repository המקומי:
git pull remote_name remote_branch_name
אני חושב שזה העיקר