![]() You can confirm this by checking the repository’s config via your command line: git config -e. If you say “yes”, it will do the cloning, set up the remote upstream branch and perform an update for you automatically. Try: $ gh repo fork cli/cliĭuring the forking process, the tool will ask you if you want to clone as well. You can also fork existing repositories to your account easily from the command line. Below is an example: $ gh repo clone tailwindcss/tailwindcss You no longer need to type or copy-paste the long Git URL to clone. This format makes it easier to clone from memory. To clone, all you have to do is execute the command in the following format: gh repo clone OWNER/REPO It should show you four different commands you can append to the current repo command.Ĭloning a repo with the gh command is easier than using the git command. To confirm it’s working, type gh repo, then press tab twice. You can also run the above command in your current terminal to get the autocomplete feature without restarting your terminal. Simply add this line to your ~/.bash_profile: eval " $(gh completion -s bash )" The next step is to implement autocomplete, which is optional. You’re now able to interact with the GitHub platform via the command-line terminal. Once you provide your password, you’ll get a “Successfully authenticated GitHub CLI” message. Simply press the Enter key to start the process as illustrated below: For first-time users, you’ll be prompted with the following: Running any command will trigger this authentication process. It’s also officially supported by Visual Studio Code via terminal integration.Īfter installing GitHub CLI, you’ll need to authenticate your account. This interface will allow you to access common Linux commands and Bash features such as autocompletion. On Windows, I would recommend the use of the Git Bash terminal. gitĭebian/Ubuntu Linux: sudo apt install git & & sudo dpkg -i gh_*_linux_bįedora/Centos Linux: sudo yum localinstall gh_*_linux_amd64.rpm Windows: scoop bucket add github -gh https: / /github. The easiest way for Windows users is to use the scoop package manager.īelow are snapshots of install instructions for each supported platform: There are Signed MSI installers for Windows users too, but be aware you have to re-download and update the tool manually if you opt for this. ![]() For Linux users, you’ll need to download the package from the latest release page. For Windows and macOS, you can use package managers to install and keep GitHub CLI up to date. To get started, simply visit the installation page and find instructions on how to install GitHub CLI for your operating system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |