Git Commands L -> R
Type the following command to create a new directory for your repository:
Change into the new directory:
Initialize Git
Now that your local repository has been created, you can add files, make changes, and commit them using Git. Once you have made some changes and committed them, you can push the changes to a remote repository.
git add
Add files to the staging area using the "git add" command. For example, to add all files in the current directory to the staging area, type:
git status
Display a summary of the current state of your repository, including any changes that have been made but not yet committed, any changes that have been staged for commit, and any untracked files.
git commit
After making changes to your files and staging them with git add
, you can commit your changes using the following command:
git remote add origin
command to add a remote repository named "origin"
git push
Push the changes to the remote repository using the "git push" command
git log
This command will display a list of all the commits in your repository, starting with the most recent commit
Last updated