Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
$ cat > file1.py << EOF
cat > file1.py << EOF
> #!/usr/bin/env python
> print ("This is file1.py")
> EOF

$ cat > file2.py << EOF
> #!/usr/bin/env python
> print ("This is file2.py")
> EOF


 

What files added? status

Code Block
$ git status
On branch master

Initial commit

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	file1.py
	file2.py

nothing added to commit but untracked files present (use "git add" to track)

Adding files

The git add command schedules files to be committed to the repository.

...

Code Block
$ git rm file1.py

What's

...

modified: status

Use git status to see a list of modified files:

...

  • Changes in working copy vs. previous commit:

    Code Block
    git diff <commit>
  • Changes between two previous commits:
    Code Block
    git diff <commit1> <commit2>

 

Working With Remote Repositories

...