About 142,000 results
Open links in new tab
  1. ByteByteGo | Git Commands Cheat Sheet

    git init: Initializes a new Git repository. git clone [url]: Clones a repository from a remote URL. git add [file]: Adds a file to the staging area. git commit -m “ [message]”: Commits changes with a descriptive message. git status: Shows the status of the working directory.

  2. git - How to add a local repo and treat it as a remote repo - Stack ...

    You do that by running git remote add [alias] [url]. That adds [url] under a local remote named [alias]. #example $ git remote $ git remote add github [email protected] :schacon/hw.git $ git remote -v

  3. Synchronizing a local Git repository with a remote one

    Feb 17, 2019 · git fetch # This updates 'remote' portion of local repo. git reset --hard origin/<your-working-branch> # this will sync your local copy with remote content, discarding any committed # or uncommitted changes. Although your local commits and changes will disappear from sight after this, it is possible to recover committed changes, if necessary.

  4. ByteByteGo | How Git Works

    Local repository: contains the code that has been committed. Remote repository: the remote server that stores the code. Most Git commands primarily move files between these four locations.

  5. EP 40: Git workflow - by Alex Xu - ByteByteGo Newsletter

    Jan 7, 2023 · Every developer maintains a local copy of the main repository and edits and commits to the local copy. The commit is very fast because the operation doesn’t interact with the remote repository. If the remote repository crashes, the files can be …

  6. EP49: API Architectural Styles - by Alex Xu - ByteByteGo

    To begin with, it's essential to identify where our code is stored. The common assumption is that there are only two locations - one on a remote server like Github and the other on our local machine. However, this isn't entirely accurate. Git maintains three local storages on our machine, which means that our code can be found in four places:

  7. EP160: Top 20 System Design Concepts You Should Know

    Apr 26, 2025 · 🔧 Basic Commands git init – Initialize a new Git repository. git clone <repo_url> – Clone a remote repository. git status – Check the status of your working directory. git add <file> – Stage changes for commit. git commit -m "message" – Commit staged changes with a message. git push – Push your local commits to the remote ...

  8. ByteByteGo | How does Git Work?

    Git is a distributed version control system that allows multiple developers to work on the same project simultaneously. It is widely used in software development to manage source code history. The diagram above shows the Git workflow with common commands. A handy guide to learning how does Git work.

  9. git-commands-cheat-sheet.md - GitHub

    Apr 2, 2025 · git checkout [branch-name]: Switches to the specified branch. git merge [branch-name] : Merges the specified branch into the current branch. git branch -d [branch-name] : Deletes the specified branch.

  10. system-design-101/data/guides/how-does-git-work.md at main

    Local repository: contains the code that has been committed. Remote repository: the remote server that stores the code. Most Git commands primarily move files between these four locations.

  11. Some results have been removed
Refresh