-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
note: créer un dépôt github facilement
- Loading branch information
1 parent
ae20dcd
commit 4bd3a55
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Créer un dépôt GitHub dans le dossier courant | ||
date: 2024-10-11T21:11:00 | ||
tags: | ||
- How-To | ||
- Github | ||
- Ligne-de-commande | ||
description: Une petite commande qui permet de publier un dépôt git existant sur GitHub en s'appuyant sur la ligne de commande `gh` | ||
stub: true | ||
draft: true | ||
--- | ||
|
||
Installer et configurer [la commande `gh`](https://cli.github.com/). | ||
|
||
```sh | ||
gh repo create ${PWD##*/} --private --source=. --remote=upstream | ||
``` | ||
|
||
Ajouter à `.zshrc` sous la forme d'un alias | ||
|
||
```sh | ||
#GitHub | ||
alias ghi="gh repo create ${PWD##*/} --private --source=. --remote=upstream" | ||
``` | ||
|
||
Dans un dépôt existant (il faut avoir créé un dépôt : `git init`) | ||
|
||
```sh | ||
ghi | ||
``` |