Commandes "Git" de base - AutreTechLab/ATL_Blockly_Suite GitHub Wiki

Git basic

  • git clone https://github.com/AutreTechLab/ATL_Blockly_Suite.git
  • git status
  • git add <file>
  • git add -A
  • git commit -m "commit message"
  • git push https://github.com/AutreTechLab/ATL_Blockly_Suite.git <branch-name>
  • git push --set-upstream https://github.com/AutreTechLab/ATL_Blockly_Suite.git <name-of-your-branch>
  • git push -u origin <branch_name>
  • git pull https://github.com/AutreTechLab/ATL_Blockly_Suite.git

  • Viewing branches:
    • git branch
    • git branch --list
  • Creating a new branch in local repository
    • git branch <branch-name>
  • Creating the branch in the global repository
    • git push -u <remote> <branch-name>
  • Git checkout (switching from one branch to another)
    • git checkout <name-of-your-branch>
    • git checkout -b <name-of-your-branch>
  • Deleting a branch:
    • git branch -d <branch-name>

Merge

  • First you should switch to the dev branch:
    • git checkout dev
  • Before merging, you should update your local dev branch:
    • git fetch
  • Finally, you can merge your feature branch into dev:
    • git merge <branch-name>
⚠️ **GitHub.com Fallback** ⚠️