0% found this document useful (0 votes)
107 views

Introduction To Git and Terminal

The document shows a user cloning a Git repository from Bitbucket, then navigating the directory structure and files within. It contains the course materials for a 512 class, including a syllabus PDF and homework assignment PDF. The user is unable to view the PDF locally as their system is missing a PDF viewer application. They also try unsuccessfully to search for Git documentation online.
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

Introduction To Git and Terminal

The document shows a user cloning a Git repository from Bitbucket, then navigating the directory structure and files within. It contains the course materials for a 512 class, including a syllabus PDF and homework assignment PDF. The user is unable to view the PDF locally as their system is missing a PDF viewer application. They also try unsuccessfully to search for Git documentation online.
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 6

Last login: Mon Aug 29 11:40:12 on ttys001

client-104-39-63-187:~ ale$ mkdir 512


client-104-39-63-187:~ ale$ cd 512
client-104-39-63-187:512 ale$ git init
Initialized empty Git repository in /Users/ale/512/.git/
client-104-39-63-187:512 ale$ dir
-bash: dir: command not found
client-104-39-63-187:512 ale$ ls
client-104-39-63-187:512 ale$ ls -la
total 0
drwxr-xr-x 3 ale staff 102 Aug 31 10:28 .
drwxr-xr-x+ 46 ale staff 1564 Aug 31 10:27 ..
drwxr-xr-x 10 ale staff 340 Aug 31 10:28 .git
client-104-39-63-187:512 ale$ ls -l -a
total 0
drwxr-xr-x 3 ale staff 102 Aug 31 10:28 .
drwxr-xr-x+ 46 ale staff 1564 Aug 31 10:27 ..
drwxr-xr-x 10 ale staff 340 Aug 31 10:28 .git
client-104-39-63-187:512 ale$ vim first.txt
client-104-39-63-187:512 ale$ ls -la
total 8
drwxr-xr-x 4 ale staff 136 Aug 31 10:43 .
drwxr-xr-x+ 47 ale staff 1598 Aug 31 10:43 ..
drwxr-xr-x 10 ale staff 340 Aug 31 10:28 .git
-rw-r--r-- 1 ale staff 34 Aug 31 10:43 first.txt
client-104-39-63-187:512 ale$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
first.txt
nothing added to commit but untracked files present (use "git add" to track)
client-104-39-63-187:512 ale$ git add first.txt
client-104-39-63-187:512 ale$ git status
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: first.txt
client-104-39-63-187:512 ale$ git commit
[master (root-commit) 77fa12b] this is my first commithis is my first committ
Committer: Adriana Alejandra Lpez Espino <ale@client-104-39-63-

187.mobility.psu.edu>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 2 insertions(+)
create mode 100644 first.txt
client-104-39-63-187:512 ale$ vim first.txt
client-104-39-63-187:512 ale$ git commit
On branch master
Changes not staged for commit:
modified: first.txt
no changes added to commit
client-104-39-63-187:512 ale$ git commit -a -m 'second commit'
[master 4ee83ad] second commit
Committer: Adriana Alejandra Lpez Espino <[email protected]>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 2 insertions(+)
client-104-39-63-187:512 ale$ git log
commit 4ee83ad0295d6dafc143fe7a3db42524a164368b
Author: Adriana Alejandra Lpez Espino <[email protected]>
Date: Wed Aug 31 10:56:53 2016 -0400
second commit
commit 77fa12b98c02a454ce74e36f03c6af16eef92298
Author: Adriana Alejandra Lpez Espino <[email protected]>

Date: Wed Aug 31 10:47:13 2016 -0400


this is my first commithis is my first committ
client-104-39-63-187:512 ale$ ^C
-bash: :s^C: substitution failed
client-104-39-63-187:512 ale$ git checkout
77fa12b98c02a454ce74e36f03c6af16eef92298
Note: checking out '77fa12b98c02a454ce74e36f03c6af16eef92298'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 77fa12b... this is my first commithis is my first committ
client-104-39-63-187:512 ale$ vim first.txt
client-104-39-63-187:512 ale$ git checkout -b experiment
Switched to a new branch 'experiment'
client-104-39-63-187:512 ale$ vim first.txt
client-104-39-63-187:512 ale$ git add .
client-104-39-63-187:512 ale$ git commit -m 'experiment 1'
[experiment 12862ea] experiment 1
Committer: Adriana Alejandra Lpez Espino <[email protected]>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 2 insertions(+)
client-104-39-63-187:512 ale$ git checkout master
Switched to branch 'master'
client-104-39-63-187:512 ale$ vim first.txt
client-104-39-63-187:512 ale$ cd ..
client-104-39-63-187:~ ale$ git clone https://bitbucketbitbucket.org/rji5040/512a
Cloning into '512a'...
fatal: unable to access 'https://bitbucketbitbucket.org/rji5040/512a/': Could not
resolve host: bitbucketbitbucket.org
client-104-39-63-187:~ ale$ ls -la

total 592
drwxr-xr-x+ 47 ale staff 1598 Aug 31 11:17 .
drwxr-xr-x 6 root admin 204 Apr 6 11:23 ..
-r-------- 1 ale staff
7 Oct 18 2014 .CFUserTextEncoding
-rw-r--r--@ 1 ale staff 28676 Aug 31 10:05 .DS_Store
drwxr-xr-x 3 ale staff 102 Jan 24 2015 .R
-rw-r--r-- 1 ale staff 227 Jan 25 2015 .Rapp.history
-rw-r--r-- 1 ale staff
0 Aug 29 11:35 .Rhistory
drwx------ 13 ale staff 442 Aug 28 01:07 .Trash
drwxr-xr-x 4 ale staff 136 Apr 21 2014 .adobe
-rw------- 1 ale staff 514 Aug 28 01:07 .bash_history
drwxr-xr-x 26 ale staff 884 Aug 31 10:16 .bash_sessions
drwxr-xr-x 3 ale staff 102 Mar 6 2014 .config
drwx------ 3 ale staff 102 Mar 9 2014 .cups
drwx------ 10 ale staff 340 Apr 6 11:44 .dropbox
drwx------ 3 ale staff 102 Jan 24 2015 .emacs.d
-rw-r--r-- 1 ale staff 222 Aug 29 11:41 .julia_history
drwxr-xr-x 5 ale staff 170 Nov 19 2014 .matlab
drwxr-xr-x 3 ale staff 102 Mar 13 19:06 .oracle_jre_usage
drwxr-xr-x 9 ale staff 306 Jun 24 12:54 .qgis2
drwxr-xr-x 12 ale staff 408 Aug 29 11:35 .rstudio-desktop
drwxr-xr-x 5 ale staff 170 Oct 19 2014 .subversion
-rw------- 1 ale staff 1537 Aug 31 11:15 .viminfo
drwxr-xr-x 4 ale staff 136 Aug 31 11:15 512
drwxr-xr-x 5 ale staff 170 Oct 26 2015 Applications
drwx------ 3 ale staff 102 May 19 2015 Box Sync
drwx------+ 5 ale staff 170 Aug 28 01:07 Desktop
drwx------+ 14 ale staff 476 Aug 28 19:58 Documents
drwx------+ 22 ale staff 748 Aug 31 10:06 Downloads
drwx------@ 24 ale staff 816 Aug 27 19:33 Dropbox
drwx------@ 69 ale staff 2346 Apr 6 11:37 Library
drwx------+ 8 ale staff 272 Aug 27 17:58 Movies
drwx------+ 5 ale staff 170 Mar 14 2014 Music
drwx------+ 83 ale staff 2822 Aug 24 12:50 Pictures
drwxr-xr-x+ 6 ale staff 204 Jul 18 19:00 Public
drwxr-xr-x 3 ale staff 102 May 31 2014 Samsung
-rw-r--r-- 1 ale staff 73546 Nov 19 2014 hs_error_pid3817.log
-rw-r--r-- 1 ale staff 76264 Oct 21 2014 hs_error_pid499.log
-rw-r--r-- 1 ale staff 75618 Oct 21 2014 hs_error_pid818.log
-rw-r--r-- 1 ale staff 896 Oct 8 2014 ibt_application.log
-rw-r--r-- 1 ale staff
0 Sep 28 2014 ibtsa.log
-rw-r--r-- 1 ale staff 3254 Dec 24 2014 matlab_crash_dump.2090-1
-rw-r--r-- 1 ale staff 3965 Nov 19 2014 matlab_crash_dump.3817-1
-rw-r--r-- 1 ale staff 3964 Oct 21 2014 matlab_crash_dump.499-1
-rw-r--r-- 1 ale staff 3964 Oct 21 2014 matlab_crash_dump.818-1
drwxr-xr-x 4 ale staff 136 Jan 25 2015 my
-rw-r--r-- 1 ale staff
0 Sep 28 2014 oasys.log
-rw-r--r-- 1 ale staff
0 Sep 28 2014 summary.txt
client-104-39-63-187:~ ale$ cd 512a
-bash: cd: 512a: No such file or directory

client-104-39-63-187:~ ale$ git clone https://bitbucket.org/rji5040/512a.git


Cloning into '512a'...
remote: Counting objects: 42, done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 42 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (42/42), done.
Checking connectivity... done.
client-104-39-63-187:~ ale$ cd 512a
client-104-39-63-187:512a ale$ ls -la
total 224
drwxr-xr-x 8 ale staff
272 Aug 31 11:19 .
drwxr-xr-x+ 48 ale staff 1632 Aug 31 11:19 ..
drwxr-xr-x 13 ale staff
442 Aug 31 11:19 .git
drwxr-xr-x 4 ale staff
136 Aug 31 11:19 1_semester
-rw-r--r-- 1 ale staff
40 Aug 31 11:19 contributors.txt
drwxr-xr-x 3 ale staff
102 Aug 31 11:19 lecture_materials
-rw-r--r-- 1 ale staff
34 Aug 31 11:19 readme
-rw-r--r-- 1 ale staff 103085 Aug 31 11:19 syllabus512-16.pdf
client-104-39-63-187:512a ale$ cd 1_semester/
client-104-39-63-187:1_semester ale$ ls -la
total 0
drwxr-xr-x 4 ale staff 136 Aug 31 11:19 .
drwxr-xr-x 8 ale staff 272 Aug 31 11:19 ..
drwxr-xr-x 3 ale staff 102 Aug 31 11:19 homework
drwxr-xr-x 7 ale staff 238 Aug 31 11:19 lecture_materials
client-104-39-63-187:1_semester ale$ cd homework/
client-104-39-63-187:homework ale$ ls -la
total 216
drwxr-xr-x 3 ale staff
102 Aug 31 11:19 .
drwxr-xr-x 4 ale staff
136 Aug 31 11:19 ..
-rw-r--r-- 1 ale staff 110408 Aug 31 11:19 hw1.pdf
client-104-39-63-187:homework ale$ ls -la
total 216
drwxr-xr-x 3 ale staff
102 Aug 31 11:19 .
drwxr-xr-x 4 ale staff
136 Aug 31 11:19 ..
-rw-r--r-- 1 ale staff 110408 Aug 31 11:19 hw1.pdf
client-104-39-63-187:homework ale$ pdfview.pdf
-bash: pdfview.pdf: command not found
client-104-39-63-187:homework ale$ okular hw1.pdf
-bash: okular: command not found
client-104-39-63-187:homework ale$ preview .
-bash: preview: command not found
client-104-39-63-187:homework ale$ open .
client-104-39-63-187:homework ale$ nota: git pull merges all changes also made by
others, if you want to bring them without them messig up your version use fetch
-bash: nota:: command not found
client-104-39-63-187:homework ale$ git pull
Already up-to-date.
client-104-39-63-187:homework ale$ google 'pro git'
-bash: google: command not found

client-104-39-63-187:homework ale$

You might also like