mkdir my-project cd my-project git init git remote add origin git@github.com:username/repo-name.git
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) curl -fsSL https://github.com | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://github.com stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt update sudo apt install gh -y Use code with caution. gh auth login Use code with caution. Conclusion
Once set up, you can manage your projects directly from the Ubuntu terminal:
git pull origin main
mkdir my-project cd my-project git init git remote add origin git@github.com:username/repo-name.git
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) curl -fsSL https://github.com | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://github.com stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt update sudo apt install gh -y Use code with caution. gh auth login Use code with caution. Conclusion github in ubuntu
Once set up, you can manage your projects directly from the Ubuntu terminal: mkdir my-project cd my-project git init git remote
git pull origin main