Here are some tips for using the GitHub terminal:
- Use
git status
to check the current status of your repository, including which files have been modified and which branch you are currently on. - Use
git diff
to see the differences between the current state of your files and the most recent commit. - Use
git add
to stage changes for a commit. You can add specific files or usegit add .
to stage all changes in the current directory. - Use
git commit
to commit your changes. Be sure to include a clear and concise commit message that describes the changes you made. - Use
git push
to upload your commits to the remote repository. This will update the repository on GitHub with your changes. - Use
git pull
to retrieve updates from the remote repository and merge them into your local repository. This is useful if you are working on a team and need to stay up-to-date with the latest changes. - Use
git branch
to list all the branches in the current repository andgit branch -a
to list all branches in the current repository and the remote branches. - Use
git stash
to temporarily save changes that you don’t want to commit, but don’t want to lose. This is useful if you need to switch branches or pull in updates but don’t want to commit your changes yet. - Use
git log
to view the commit history of the repository. This can be useful for tracking down when a specific change was made or who made it. - Use
git clone
command to clone a repository from a remote server. This will create a local copy of the repository and all its branches.