#GIT COMMANDS
START : //In local folder
- git init //Init the "local dataBase" of git
CONFIG :
- git config --global user.email "email" //set the email
- git config --global user.name NAME //set the name of github account
PUSH :
-
git remote add origin [REMOTE_DEPOSITORY_LINK] //Add a remote repository origin to PUSH / PULL folder/s
-
git status //Define the folders which were modified and so sendable to the remote repository
-
git add //ADD a folder/s to the list of futur pushing items * // ALL . // ALL [SOME_FOLDER] // One folder
-
git commit -m "Some description text" //Setup a description of why pushing items
-
git branch -M [BRANCH_NAME] //Create or change the active branch
-
git push //Push the folder/s added into the list before in the remote repository --force //Force the push origin [BRANCH_NAME]
PULL :
-
git remote -v //Check what are the origins
-
git branch -r //Check what are the branch which can be used ex : origin/master
-
git fetch origin [BRANCH_NAME] //Pull remote branch to local and switch branches
-
git clone [REMOTE_DEPOSITORY_LINK] //Clone a repository from the remote repository into a local folder
-
git pull