PwebBlogVonkrafft / Front-end

Page web utilisateur , Application Reactjs
0 stars 1 forks source link

GIT #1

Open Jessica-13 opened 2 years ago

Jessica-13 commented 2 years ago

Créer un dépôt sur GitHub Créer un répertoire sur le PC où on souhaite enregistrer le projet, puis aller dans le dossier créé et taper (qui crée un dépôt en local):

git init


## For a Linux-based OS ⤴

For Linux, you need to configure the local GIT client with a username and email address,

$ git config --global user.name "your_github_username"
$ git config --global user.email "your_github_email"
$ git config -l

Once GIT is configured, we can begin using it to access GitHub. Example:

$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
> Cloning into `Spoon-Knife`...
$ Username for 'https://github.com' : username
$ Password for 'https://github.com' : give your personal access token here

Now cache the given record in your computer to remembers the token:

$ git config --global credential.helper cache

If needed, anytime you can delete the cache record by:

$ git config --global --unset credential.helper
$ git config --system --unset credential.helper

Now try to pull with -v to verify

$ git pull -v

Aller à l'intérieur et y copier les fichiers et/ou dossiers que on souhaite télécharger. Puis taper depuis le terminal :

git add *

Cela sélectionne tout le contenu, puis taper :

git commit -m "message"

En pratique, avec la commande 'commit', on charge le projet dans le git HEAD, mais pas encore dans le dépôt distant. Enfin, pour tout télécharger à distance, taper :

git push origin main


En cas de problèmes du type :

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

Voir :

https://stackoverflow.com/questions/68775869/support-for-password-authentication-was-removed-please-use-a-personal-access-to


Pour mettre à jour le dossier sur notre ordinateur :

git pull


Documentation

Git : https://git-scm.com/doc

GitHub : https://docs.github.com/en

Jessica-13 commented 2 years ago

VERSION SIMPLE

$ git init

$ git clone https://github.com/User/HTTPSProject.git (Copier l'adresse HTTPS du dossier depuis GitHub)

$ git add *

$ git commit -m "message"

$ git push origin main

En cas de problèmes du type :

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

Voir :

https://stackoverflow.com/questions/68775869/support-for-password-authentication-was-removed-please-use-a-personal-access-to