Loading lessons...
Sharing and Inspection Commands
Sharing and Inspection Commands
These commands move commits between repositories and inspect the details of your history.
git remote
git remote -v
git remote add origin URL
Manage connections to remote repositories.
git fetch
git fetch
Downloads remote commits but does not merge them.
git pull
git pull
Fetches and merges remote commits.
git push
git push
git push -u origin main
Uploads local commits to the remote.
git clone
git clone URL
Copies a remote repository locally.
git show
git show
git show abc123
Inspects a single commit.
git blame
git blame file.txt
Shows who changed each line.
Debugging tools
git grep "search term"
git bisect start
grep searches your files and history; bisect hunts down which commit introduced a bug.
TL;DR
- remote, fetch, pull, push, and clone share work.
- show and blame inspect commits and lines.
- grep searches content; bisect finds the commit that broke something.