-
Notifications
You must be signed in to change notification settings - Fork 13
MyExample 01
Zhamri Che Ani edited this page Sep 23, 2019
·
1 revision
Last login: Sun Sep 22 08:51:04 on ttys000
Zhamri$ pwd
/Volumes/Data/Zhamri
Zhamri$ git clone https://github.com/zhamri/TestGit.git
Cloning into 'TestGit'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Zhamri$ ls
GitStiw3054 TestGit TestJava
Zhamri$ ls -al
total 24
drwxr-xr-x 6 zhamricheani admin 204 Sep 22 09:05 .
drwxrwxr-x 27 root admin 986 Sep 21 11:38 ..
-rw-r--r--@ 1 zhamricheani admin 10244 Sep 22 09:06 .DS_Store
drwxr-xr-x 2 zhamricheani admin 68 Sep 22 08:57 GitStiw3054
drwxr-xr-x 4 zhamricheani admin 136 Sep 22 09:05 TestGit
drwxr-xr-x 7 zhamricheani admin 238 Sep 18 09:53 TestJava
Zhamri$
Zhamri$ pwd
/Volumes/Data/Zhamri
Zhamri$ cd TestGit
TestGit$ pwd
/Volumes/Data/Zhamri/TestGit
TestGit$ ls
README.md
TestGit$ ls -al
total 8
drwxr-xr-x 4 zhamricheani admin 136 Sep 22 09:05 .
drwxr-xr-x 6 zhamricheani admin 204 Sep 22 09:05 ..
drwxr-xr-x 13 zhamricheani admin 442 Sep 22 09:05 .git
-rw-r--r-- 1 zhamricheani admin 9 Sep 22 09:05 README.md
TestGit$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
TestGit$ ls
README.md
TestGit$ touch Zhamri.md
TestGit$ ls
README.md Zhamri.md
TestGit$ git commit -m "My First Git Example"
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
Zhamri.md
nothing added to commit but untracked files present
TestGit$
TestGit$
TestGit$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
Zhamri.md
nothing added to commit but untracked files present (use "git add" to track)
TestGit$ git add Zhamri.md
TestGit$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: Zhamri.md
TestGit$ git commit -m "My First Git Example"
[master 585f386] My First Git Example
1 file changed, 3 insertions(+)
create mode 100644 Zhamri.md
TestGit$
TestGit$
TestGit$
TestGit$ git push
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 302 bytes | 302.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/zhamri/TestGit.git
ca168db..585f386 master -> master
TestGit$
TestGit$
TestGit$ ls
README.md Zhamri.md
TestGit$ touch Zhamri1.md
TestGit$ touch Zhamri2.md
TestGit$ ls
README.md Zhamri.md Zhamri1.md Zhamri2.md
TestGit$ git add .
TestGit$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: Zhamri1.md
new file: Zhamri2.md
TestGit$ git commit -m "Upload two more files"
[master c97f445] Upload two more files
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 Zhamri1.md
create mode 100644 Zhamri2.md
TestGit$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
TestGit$ git push
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 315 bytes | 315.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/zhamri/TestGit.git
585f386..c97f445 master -> master
TestGit$
TestGit$
TestGit$ pwd
/Volumes/Data/Zhamri/TestGit
TestGit$ cd ..
Zhamri$ pwd
/Volumes/Data/Zhamri
Zhamri$ cd GitStiw3054/
GitStiw3054$ ls
GitStiw3054$
GitStiw3054$
GitStiw3054$ git init
Initialized empty Git repository in /Volumes/Data/Zhamri/GitStiw3054/.git/
GitStiw3054$
GitStiw3054$
GitStiw3054$ ls
GitStiw3054$ ls -al
total 0
drwxr-xr-x 3 zhamricheani admin 102 Sep 22 09:41 .
drwxr-xr-x 6 zhamricheani admin 204 Sep 22 09:05 ..
drwxr-xr-x 10 zhamricheani admin 340 Sep 22 09:41 .git
GitStiw3054$
GitStiw3054$
GitStiw3054$ cd ..
Zhamri$ ls
GitStiw3054 TestGit TestJava
Zhamri$ git clone https://github.com/zhamri/MyClass-JSoup.git
Cloning into 'MyClass-JSoup'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 18 (delta 3), reused 11 (delta 0), pack-reused 0
Unpacking objects: 100% (18/18), done.
Zhamri$ ls
GitStiw3054 MyClass-JSoup TestGit TestJava
Zhamri$ cd MyClass-JSoup/
MyClass-JSoup$ ls
README.md pom.xml src
MyClass-JSoup$ code .
MyClass-JSoup$