Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

git-add

Add all files to a commit except a single file?

September 7, 2022 by Tarik

git add -u git reset — main/dontcheckmein.txt Note: Git has subsequently added special syntax for this, which is explained in other answers.

Categories git Tags git, git-add Leave a comment

Removing multiple files from a Git repo that have already been deleted from disk

September 6, 2022 by Tarik

For Git 1.x $ git add -u This tells git to automatically stage tracked files — including deleting the previously tracked files. For Git 2.0 To stage your whole working tree: $ git add -u :/ To stage just the current path: $ git add -u .

Categories git Tags git, git-add, git-commit, git-rm Leave a comment

Removing multiple files from a Git repo that have already been deleted from disk

August 29, 2022 by Tarik

For Git 1.x $ git add -u This tells git to automatically stage tracked files — including deleting the previously tracked files. For Git 2.0 To stage your whole working tree: $ git add -u :/ To stage just the current path: $ git add -u .

Categories git Tags git, git-add, git-commit, git-rm Leave a comment

Difference between “git add -A” and “git add .”

August 22, 2022 by Tarik

This answer only applies to Git version 1.x. For Git version 2.x, see other answers. Summary: git add -A stages all changes git add . stages new files and modifications, without deletions (on the current directory and its subdirectories). git add -u stages modifications and deletions, without new files Detail: git add -A is equivalent … Read more

Categories git Tags git, git-add Leave a comment

Message ‘src refspec master does not match any’ when pushing commits in Git

August 20, 2022 by Tarik

Maybe you just need to commit. I ran into this when I did: mkdir repo && cd repo git remote add origin /path/to/origin.git git add . Oops! Never committed! git push -u origin master error: src refspec master does not match any. All I had to do was: git commit -m “initial commit” git push … Read more

Categories git Tags git, git-add, git-clone, git-commit, git-refspec Leave a comment
Newer posts
← Previous Page1 … Page3 Page4

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa