Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ git init Test
- Initialized empty Git repository in /home/weronika/Pulpit/Test/.git/
- $ cd Test
- $ git status
- On branch master
- No commits yet
- nothing to commit (create/copy files and use "git add" to track)
- $ git add hello.c
- $ git commit -m "dodanie pliku hello.c do mastera"
- [master (root-commit) 7b3dbc1] dodanie pliku hello.c do mastera
- 1 file changed, 7 insertions(+)
- create mode 100644 hello.c
- $ git checkout -b nowyBranch
- Switched to a new branch 'nowyBranch'
- $ git add integer.c
- $ git commit -m "dodanie pliku integer.c do nowyBranch"
- [nowyBranch ec83dc2] dodanie pliku integer.c do nowyBranch
- 1 file changed, 13 insertions(+)
- create mode 100644 integer.c
- $ git log --all --graph --decorate
- * commit ec83dc201e70d33cf5952c1c060e032307e4a663 (HEAD -> nowyBranch)
- | Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:35:27 2018 +0100
- |
- | dodanie pliku integer.c do nowyBranch
- |
- * commit 7b3dbc1b57d2f9f1b1cb5abef10cb61001f23e73 (master)
- Author: 236733 <236733@student.pwr.edu.pl>
- Date: Fri Nov 30 00:34:15 2018 +0100
- dodanie pliku hello.c do mastera
- $ git checkout master
- Switched to branch 'master'
- $ git checkout -b testowyBranch
- Switched to a new branch 'testowyBranch'
- $ git add ten.c
- $ git commit -m "dodanie pliku ten.c do testowyBranch"
- [testowyBranch d0d1e82] dodanie pliku ten.c do testowyBranch
- 1 file changed, 14 insertions(+)
- create mode 100644 ten.c
- $ git checkout master
- Switched to branch 'master'
- $ git log --all --graph --decorate
- * commit d0d1e82bea18dda9499bf751dc92a7a886bfab0c (testowyBranch)
- | Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:37:49 2018 +0100
- |
- | dodanie pliku ten.c do testowyBranch
- |
- | * commit ec83dc201e70d33cf5952c1c060e032307e4a663 (nowyBranch)
- |/ Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:35:27 2018 +0100
- |
- | dodanie pliku integer.c do nowyBranch
- |
- * commit 7b3dbc1b57d2f9f1b1cb5abef10cb61001f23e73 (HEAD -> master)
- Author: 236733 <236733@student.pwr.edu.pl>
- Date: Fri Nov 30 00:34:15 2018 +0100
- dodanie pliku hello.c do mastera
- $ git checkout -b branchDoTestowSkryptu
- Switched to a new branch 'branchDoTestowSkryptu'
- $ git add year.c
- $ git commit -m "dodanie pliku yer.c do branchDoTestowSkryptu"
- [branchDoTestowSkryptu f4d95af] dodanie pliku yer.c do branchDoTestowSkryptu
- 1 file changed, 27 insertions(+)
- create mode 100644 year.c
- $ git log --all --graph --decorate
- * commit f4d95af47bbc928e4cc3a149109ed38a12fec273 (HEAD -> branchDoTestowSkryptu)
- | Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:40:35 2018 +0100
- |
- | dodanie pliku yer.c do branchDoTestowSkryptu
- |
- | * commit d0d1e82bea18dda9499bf751dc92a7a886bfab0c (testowyBranch)
- |/ Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:37:49 2018 +0100
- |
- | dodanie pliku ten.c do testowyBranch
- |
- | * commit ec83dc201e70d33cf5952c1c060e032307e4a663 (nowyBranch)
- |/ Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:35:27 2018 +0100
- |
- | dodanie pliku integer.c do nowyBranch
- |
- * commit 7b3dbc1b57d2f9f1b1cb5abef10cb61001f23e73 (master)
- Author: 236733 <236733@student.pwr.edu.pl>
- Date: Fri Nov 30 00:34:15 2018 +0100
- dodanie pliku hello.c do mastera
- $ git checkout master
- Switched to branch 'master'
- $ git branch -D nowyBranch
- Deleted branch nowyBranch (was ec83dc2).
- $ git branch -D branchDoTestowSkryptu
- Deleted branch branchDoTestowSkryptu (was f4d95af).
- $ git log --all --graph --decorate
- * commit d0d1e82bea18dda9499bf751dc92a7a886bfab0c (testowyBranch)
- | Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:37:49 2018 +0100
- |
- | dodanie pliku ten.c do testowyBranch
- |
- * commit 7b3dbc1b57d2f9f1b1cb5abef10cb61001f23e73 (HEAD -> master)
- Author: 236733 <236733@student.pwr.edu.pl>
- Date: Fri Nov 30 00:34:15 2018 +0100
- dodanie pliku hello.c do mastera
- $ git reflog
- 7b3dbc1 (HEAD -> master) HEAD@{0}: checkout: moving from master to master
- 7b3dbc1 (HEAD -> master) HEAD@{1}: checkout: moving from branchDoTestowSkryptu to master
- f4d95af HEAD@{2}: commit: dodanie pliku yer.c do branchDoTestowSkryptu
- 7b3dbc1 (HEAD -> master) HEAD@{3}: checkout: moving from master to branchDoTestowSkryptu
- 7b3dbc1 (HEAD -> master) HEAD@{4}: checkout: moving from testowyBranch to master
- d0d1e82 (testowyBranch) HEAD@{5}: commit: dodanie pliku ten.c do testowyBranch
- 7b3dbc1 (HEAD -> master) HEAD@{6}: checkout: moving from master to testowyBranch
- 7b3dbc1 (HEAD -> master) HEAD@{7}: checkout: moving from nowyBranch to master
- ec83dc2 HEAD@{8}: commit: dodanie pliku integer.c do nowyBranch
- 7b3dbc1 (HEAD -> master) HEAD@{9}: checkout: moving from master to nowyBranch
- 7b3dbc1 (HEAD -> master) HEAD@{10}: commit (initial): dodanie pliku hello.c do mastera
- $ bash skrypt.sh
- Already on 'master'
- Note: checking out 'ec83dc2'.
- 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 ec83dc2 dodanie pliku integer.c do nowyBranch
- Switched to a new branch 'branchec83dc2'
- Switched to branch 'master'
- * commit d0d1e82bea18dda9499bf751dc92a7a886bfab0c (testowyBranch)
- | Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:37:49 2018 +0100
- |
- | dodanie pliku ten.c do testowyBranch
- |
- | * commit ec83dc201e70d33cf5952c1c060e032307e4a663 (branchec83dc2)
- |/ Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:35:27 2018 +0100
- |
- | dodanie pliku integer.c do nowyBranch
- |
- * commit 7b3dbc1b57d2f9f1b1cb5abef10cb61001f23e73 (HEAD -> master)
- Author: 236733 <236733@student.pwr.edu.pl>
- Date: Fri Nov 30 00:34:15 2018 +0100
- dodanie pliku hello.c do mastera
- Note: checking out 'f4d95af'.
- 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 f4d95af dodanie pliku yer.c do branchDoTestowSkryptu
- Switched to a new branch 'branchf4d95af'
- Switched to branch 'master'
- * commit f4d95af47bbc928e4cc3a149109ed38a12fec273 (branchf4d95af)
- | Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:40:35 2018 +0100
- |
- | dodanie pliku yer.c do branchDoTestowSkryptu
- |
- | * commit d0d1e82bea18dda9499bf751dc92a7a886bfab0c (testowyBranch)
- |/ Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:37:49 2018 +0100
- |
- | dodanie pliku ten.c do testowyBranch
- |
- | * commit ec83dc201e70d33cf5952c1c060e032307e4a663 (branchec83dc2)
- |/ Author: 236733 <236733@student.pwr.edu.pl>
- | Date: Fri Nov 30 00:35:27 2018 +0100
- |
- | dodanie pliku integer.c do nowyBranch
- |
- * commit 7b3dbc1b57d2f9f1b1cb5abef10cb61001f23e73 (HEAD -> master)
- Author: 236733 <236733@student.pwr.edu.pl>
- Date: Fri Nov 30 00:34:15 2018 +0100
- dodanie pliku hello.c do mastera
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement