Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
# View remote connections: git remote -v # origin https://github.com/jane/my-repo.git (fetch) # origin https://github.com/jane/my-repo.git (push) # Add a remote: git remote add origin https://github.com/jane/my-repo.git # Push to a remote branch (and set upstream tracking): git push -u origin main # After -u, you can just use: git push # Push a specific local branch to remote: git push origin feature/login # Pull: fetch + merge in one command: git pull # Fetch only (no merge): git fetch origin # See what fetch downloaded: git log origin/main --oneline # Merge fetched changes manually: git merge origin/main # Pull with rebase instead of merge: git pull --rebase # Delete a remote branch: git push origin --delete feature/old-feature # Rename a remote: git remote rename origin upstream
Result
Open