Skip to content

Instantly share code, notes, and snippets.

@openhubdev
Last active January 21, 2022 12:40
Show Gist options
  • Select an option

  • Save openhubdev/2f30ab78797e474f9265205d6c66abb9 to your computer and use it in GitHub Desktop.

Select an option

Save openhubdev/2f30ab78797e474f9265205d6c66abb9 to your computer and use it in GitHub Desktop.

Revisions

  1. openhubdev revised this gist Jan 21, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,6 @@ stages modifications and deletions, without new files

    The important point about `git add .` is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, ***it does not stage any 'rm' actions***.

    `git add -u` looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. **It does not add any new files**, it only stages changes to already tracked files.
    `git add -u` looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. ***It does not add any new files***, it only stages changes to already tracked files.

    `git add -A` or `git add --all` is a handy shortcut for doing both of those. This **adds, modifies, and removes** index entries to match the working tree.
    `git add -A` or `git add --all` is a handy shortcut for doing both of those. This ***adds, modifies, and removes*** index entries to match the working tree.
  2. openhubdev revised this gist Jan 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ stages modifications and deletions, without new files

    **Detail:**

    The important point about `git add .` is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, **it does not stage any 'rm' actions**.
    The important point about `git add .` is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, ***it does not stage any 'rm' actions***.

    `git add -u` looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. **It does not add any new files**, it only stages changes to already tracked files.

  3. openhubdev revised this gist Jan 21, 2022. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -11,8 +11,8 @@ stages modifications and deletions, without new files

    **Detail:**

    The important point about `git add .` is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any 'rm' actions.
    The important point about `git add .` is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, **it does not stage any 'rm' actions**.

    `git add -u` looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.
    `git add -u` looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. **It does not add any new files**, it only stages changes to already tracked files.

    `git add -A` or `git add --all` is a handy shortcut for doing both of those.
    `git add -A` or `git add --all` is a handy shortcut for doing both of those. This **adds, modifies, and removes** index entries to match the working tree.
  4. openhubdev revised this gist Jan 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ stages all changes
    `git add . `
    stages new files and modifications, without deletions (on the current directory and its subdirectories).

    `git add -u*`
    `git add -u`
    stages modifications and deletions, without new files

    **Detail:**
  5. openhubdev revised this gist Jan 21, 2022. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -11,10 +11,8 @@ stages modifications and deletions, without new files

    **Detail:**

    `git add -A` is equivalent to git add .; git add -u.

    The important point about `git add .` is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any 'rm' actions.

    `git add -u` looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.

    `git add -A` is a handy shortcut for doing both of those.
    `git add -A` or `git add --all` is a handy shortcut for doing both of those.
  6. openhubdev revised this gist Jan 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,6 @@ stages modifications and deletions, without new files

    The important point about `git add .` is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any 'rm' actions.

    `git add -u `looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.
    `git add -u` looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.

    `git add -A` is a handy shortcut for doing both of those.
  7. openhubdev revised this gist Jan 21, 2022. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -11,10 +11,10 @@ stages modifications and deletions, without new files

    **Detail:**

    git add -A` is equivalent to git add .; git add -u.
    `git add -A` is equivalent to git add .; git add -u.

    The important point about git add . is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any 'rm' actions.
    The important point about `git add .` is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any 'rm' actions.

    git add -u looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.
    `git add -u `looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.

    git add -A is a handy shortcut for doing both of those.
    `git add -A` is a handy shortcut for doing both of those.
  8. openhubdev revised this gist Jan 21, 2022. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,17 @@
    ## Summary:

    *git add -A*
    `git add -A`
    stages all changes

    **git add . **
    tages new files and modifications, without deletions (on the current directory and its subdirectories).
    `git add . `
    stages new files and modifications, without deletions (on the current directory and its subdirectories).

    **git add -u**
    `git add -u*`
    stages modifications and deletions, without new files

    Detail:
    **Detail:**

    git add -A is equivalent to git add .; git add -u.
    git add -A` is equivalent to git add .; git add -u.

    The important point about git add . is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any 'rm' actions.

  9. openhubdev revised this gist Jan 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ## Summary:

    **git add -A**
    *git add -A*
    stages all changes

    **git add . **
  10. openhubdev revised this gist Jan 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ##Summary:
    ## Summary:

    **git add -A**
    stages all changes
  11. openhubdev created this gist Jan 21, 2022.
    20 changes: 20 additions & 0 deletions git-add-stuff.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    ##Summary:

    **git add -A**
    stages all changes

    **git add . **
    tages 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 to git add .; git add -u.

    The important point about git add . is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any 'rm' actions.

    git add -u looks at all the already tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.

    git add -A is a handy shortcut for doing both of those.