Skip to content

How does Git recognize you changes? #2

@bitfishxyz

Description

@bitfishxyz

Git can only recognize your changes of plain text files but not binary files.

  1. Asuming there is an text file me.md in your folder.
Hi, my name is Jack.
I am learning git.

There are origin files and git will give it an ID(asuming it is aaaa).
2. If you change it to this:

Hi, my name is Jack.
I am learning git.
How are you ?
  • Git will notice that you add a line to the file's third line.
  • With your actions(will talk it later), git will store
    a record to .git folder.
  • Then git will return an ID (asuming it is bbbb) to you and you can back up to any
    timepoint any time.
  1. Then you change you file to this,
Hi, my name is Bob.
I am learning git.
How are you ?

you just change one word, but git is not so smart.
It will think you delete the first line and add a new line to it's header.Asuming is ID is cccc

  1. of course, you can add new file 'navy.png'

GIt will save those records, so that you can back up anytimes!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions