Last active
July 20, 2019 08:19
-
-
Save wildeng/3a3567855c5b750eaf5aa169bdbd690c to your computer and use it in GitHub Desktop.
Create and commit a file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch status.txt | |
# Now edit and save the file | |
# check the status of the repository | |
git status | |
On branch master | |
No commits yet | |
Untracked files: | |
(use "git add <file>..." to include in what will be committed) | |
status.txt | |
nothing added to commit but untracked files present (use "git add" to track) | |
# add the file to the staging area | |
git add . | |
# then save it to your repository | |
git commit -m "first commit" | |
[master (root-commit) 51dcfd9] first commit | |
1 file changed, 1 insertion(+) | |
create mode 100644 status.txt | |
# Now check the objects created | |
find .git/objects | |
.git/objects | |
.git/objects/51 | |
.git/objects/51/e1acfa6ecdb46d6c9d4ad13e82b5cab90d5f3f | |
.git/objects/51/dcfd9bba09650f50ccad8dde3ad5fe8ba68ad2 | |
.git/objects/pack | |
.git/objects/info | |
.git/objects/53 | |
.git/objects/53/8d4c75373bb8ebb9af381c4e8287b6f0819533 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment