« RStudio et github » : différence entre les versions
mAucun résumé des modifications  | 
				mAucun résumé des modifications  | 
				||
| (2 versions intermédiaires par la même utilisatrice non affichées) | |||
| Ligne 10 : | Ligne 10 : | ||
  <syntaxhighlight lang="bash"> git remote add origin git@github.com:lvaudor/nom_repo.git </syntaxhighlight>  |   <syntaxhighlight lang="bash"> git remote add origin git@github.com:lvaudor/nom_repo.git </syntaxhighlight>  | ||
Ensuite, créer une branche 'main' (suivre les instructions renvoyées par github lors de la création du repo)  | |||
== Premier commit/push ==  | == Premier commit/push ==  | ||
Ces étapes peuvent ensuite se faire soit en ligne de commandes:  | Ces étapes peuvent ensuite se faire soit en ligne de commandes:  | ||
On indique quels fichiers ajouter à l'archive distante (ici, tous):  | |||
<syntaxhighlight lang="bash"> git add . </syntaxhighlight>  | <syntaxhighlight lang="bash"> git add . </syntaxhighlight>  | ||
<syntaxhighlight lang="bash"> git commit -m "message de commit" </syntaxhighlight>  | |||
<syntaxhighlight lang="bash"> git push -u origin main </syntaxhighlight>  | <syntaxhighlight lang="bash"> git push -u origin main </syntaxhighlight>  | ||
| Ligne 23 : | Ligne 27 : | ||
https://docs.github.com/fr/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account  | https://docs.github.com/fr/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account  | ||
== Généralités git ==  | |||
Récupérer l'url de l'origine:  | |||
<syntaxhighlight lang="bash"> git remote -v </syntaxhighlight>  | |||
Changer l'url de l'origine de https à ssh:  | |||
<syntaxhighlight lang="bash">git remote set-url origin git@github.com:USERNAME/REPOSITORY.git </syntaxhighlight>  | |||
== Références==  | == Références==  | ||
Long tutoriel de git pour les utilisateurs de R par Jenny Brian: https://happygitwithr.com  | Long tutoriel de git pour les utilisateurs de R par Jenny Brian: https://happygitwithr.com  | ||