About 900,000 results
Open links in new tab
  1. How do I delete a file from a Git repository? - Stack Overflow

    git rm file.txt removes the file from the repo but also deletes it from the local file system. To remove the file from the repo and not delete it from the local file system use: git rm --cached …

  2. How can I check out a remote Git branch? - Stack Overflow

    Nov 23, 2009 · Maybe useful to someone else: When I used the Atom editor UI to fetch and pull changes, it pulled changes on the "main" branch but did not create a local reference to the …

  3. Error "'git' is not recognized as an internal or external command"

    701 I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error: 'git' is not recognized as an internal or external command, …

  4. How to change my Git username in terminal? - Stack Overflow

    Jul 18, 2017 · In your terminal, navigate to the repo you want to make the changes in. Execute git config --list to check current username & email in your local repo. Change username & email …

  5. How do I undo the most recent local commits in Git?

    I accidentally committed the wrong files to Git but haven't pushed the commit to the server yet. How do I undo those commits from the local repository?

  6. Filename too long in Git for Windows - Stack Overflow

    Mar 22, 2014 · 304 On Windows: Run Git Bash as administrator (right-clicking the app shortcut will show the option to Run as Administrator ) Run the following command: git config --system …

  7. What is `git restore` and how is it different from `git reset`?

    Sep 19, 2019 · I have presented git restore (which is still marked as "experimental") in "How to reset all files from working directory but not from staging area?", with the recent Git 2.23 …

  8. How can I undo pushed commits using Git? - Stack Overflow

    In git documentation, it says that revert command reverts commits between first and last commits (both first and last included).

  9. How do I clone a Git repository into a specific folder?

    Sep 11, 2016 · The command git clone [email protected]:whatever creates a directory named whatever containing a Git repository: ./ whatever/ .git I want the contents of the Git repository …

  10. How do I delete a Git branch locally and remotely?

    Jan 5, 2010 · Don't forget to do a git fetch --all --prune on other machines after deleting the remote branch on the server. ||| After deleting the local branch with git branch -d and deleting …