singhsamiksha / GitTraining

To understand the Git Behaviour for with different branches and Pull Request creation
0 stars 0 forks source link

To understand the GitHub basics #1

Open singhsamiksha opened 3 months ago

singhsamiksha commented 3 months ago

Use the book to understand git hub basics. By reading the following book pro-git-book.pdf

Read the first 3 chapters only to understand the basics of GitHub commands.

After completing the task add here the report containing the list of Git Commands you have studied

singhsamiksha commented 3 months ago

Git Command Report

  1. git init: Initializes Git on your local repository.
  2. git clone [url]: Clones a remote Git repository to your local machine.
  3. git status: Provides information about the status of files, categorizing them as tracked, untracked, or modified.
  4. git add: Initiates tracking for a file and stages it for commit.
  5. git diff: Shows the difference between staged and unstaged files.
  6. git diff --staged: Compares staged changes to the last commit.
  7. git commit -m "commit message": Commits staged files with a specified message.
  8. git rm index.html: Removes and stages a file.
  9. rm index.html: Deletes a file but does not stage it.
  10. git mv file_name1 file_name2: Renames a file.
  11. git log: Displays all commit logs of a repository.
  12. git commit --amend: Replaces the recent commit with the latest changes.
  13. git reset HEAD file_name: Unstages a staged file.
  14. git remote: Shows configured servers.
  15. git remote add [shortname] [url]: Adds a new remote repository.
  16. git fetch [remote_name]: Fetches all data from a remote repository.
  17. git push [remote_name] [branch_name]: Pushes changes to the remote repository.
  18. git remote show [remote_name]: Shows more information about a particular remote.
  19. git remote rename [old_remote_shortname] [new_remote_shortname]: Changes the remote's short name.
  20. git remote rm [shortname]: Removes a remote.
  21. git tag: Lists all available tags.
  22. git tag -a [tagger_name] -m [tagger message]: Creates an annotated tag.
  23. git show [tagger_name]: Shows all information about a tag.
  24. git config --global alias.co commit: Creates a shortcut for the commit command.
  25. git branch [branch_name]: Creates a new branch.
  26. git checkout [branch_name]: Switches to the specified branch.
  27. git merge [merging_branch_name]: Merges a branch with the checked-out branch.
  28. git branch -D [branch_name]: Deletes non-merged branches.
  29. git branch --merged: Shows merged branches.
  30. git branch --no-merged: Shows branches worked on but not yet merged.
  31. git pull: Fetches from the server and merges into the remote branch.
  32. git push [remote_name] --delete [branch_name]: Deletes a remote branch.
  33. git rebase [branch_name]: Rebases the branch with the checked-out branch.
singhsamiksha commented 3 months ago

MN:

Git