🔧

Git: Commands & Workflows

68 cards · 🇺🇸 English

Core Git commands, branching workflows, and version control concepts.

Study all 68 cards for free

Flashcards, quizzes, pixel-art games and a daily review that remembers for you.

Study this deck free

Try the first 10 cards

1 / 10
Question

Git

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

Already have an account? Sign in

Cards

  1. 1Git
    A distributed version control system for tracking changes in source code during software development
  2. 2Main difference between Git and client-server version control
    Git maintains a local copy of the entire repository with full history on each computer, independent of network access
  3. 3'git init'
    Creates a new Git repository in the current directory
  4. 4'git clone [URL]'
    Creates a local copy of a remote repository from the specified URL
  5. 5'git add'
    Stages changes (adds files to the staging area) preparing them for commit
  6. 6'git commit'
    Records staged changes to the repository with a message describing what was changed
  7. 7'git commit -m "message"'
    Commits staged changes with an inline commit message
  8. 8'git status'
    Shows the current state of the working directory and staging area (modified, staged, untracked files)
  9. 9'git push'
    Uploads local repository commits to a remote repository
  10. 10'git pull'
    Fetches changes from a remote repository and merges them into the current branch
  11. 11'git fetch'
    Downloads commits, files, and refs from a remote repository without merging
  12. 12'git merge'
    Combines changes from different branches into the current branch
  13. 13'git branch'
    Lists all branches in the repository (current branch marked with *)
  14. 14'git branch [name]'
    Creates a new branch with the specified name
  15. 15'git checkout [branch]'
    Switches to the specified branch
  16. 16'git checkout -b [branch]'
    Creates a new branch and immediately switches to it
  17. 17'git log'
    Displays the commit history for the current branch
  18. 18'git diff'
    Shows differences between the working directory and the staging area (or between commits)
  19. 19'git reset'
    Unstages files or resets the current branch to a specific commit
  20. 20'git reset --hard'
    Resets the working directory and staging area to match a specific commit, discarding all changes
  21. 21'git revert'
    Creates a new commit that undoes changes from a previous commit without rewriting history
  22. 22'git stash'
    Temporarily saves uncommitted changes and reverts the working directory to the last commit
  23. 23'git stash pop'
    Applies the most recently stashed changes and removes them from the stash
  24. 24'git remote'
    Lists all configured remote repositories
  25. 25'git remote add origin [URL]'
    Adds a remote repository named 'origin' at the specified URL
  26. 26'git tag'
    Creates, lists, or deletes tags (named references to specific commits, often used for releases)
  27. 27'git rebase'
    Moves or combines a sequence of commits to a new base commit, creating a linear history
  28. 28'git cherry-pick'
    Applies changes from a specific commit to the current branch
  29. 29HEAD in Git
    A reserved reference that points to the currently checked-out commit or branch
  30. 30Origin in Git
    The default name for the primary remote repository

And 38 more cards. Study the whole deck free

Articles about this deck

More Programming decks

See all
Study all 68 cards free