Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@infpc-205:~$ git help
- usage: git [--version] [--help] [-C <path>] [-c name=value]
- [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
- [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
- [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
- <command> [<args>]
- The most commonly used git commands are:
- add Add file contents to the index
- bisect Find by binary search the change that introduced a bug
- branch List, create, or delete branches
- checkout Checkout a branch or paths to the working tree
- clone Clone a repository into a new directory
- commit Record changes to the repository
- diff Show changes between commits, commit and working tree, etc
- fetch Download objects and refs from another repository
- grep Print lines matching a pattern
- init Create an empty Git repository or reinitialize an existing one
- log Show commit logs
- merge Join two or more development histories together
- mv Move or rename a file, a directory, or a symlink
- pull Fetch from and integrate with another repository or a local branch
- push Update remote refs along with associated objects
- rebase Forward-port local commits to the updated upstream head
- reset Reset current HEAD to the specified state
- rm Remove files from the working tree and from the index
- show Show various types of objects
- status Show the working tree status
- tag Create, list, delete or verify a tag object signed with GPG
- 'git help -a' and 'git help -g' lists available subcommands and some
- concept guides. See 'git help <command>' or 'git help <concept>'
- to read about a specific subcommand or concept.
- student@infpc-205:~$
- student@infpc-205:~$ git help add
- student@infpc-205:~$
- student@infpc-205:~$ git config --global user.name "Valentyna Bahriy"
- student@infpc-205:~$ mkdir newrepo
- student@infpc-205:~$ cd newrepo
- student@infpc-205:~/newrepo$ git init
- Initialized empty Git repository in /home/student/newrepo/.git/
- student@infpc-205:~/newrepo$ cd
- student@infpc-205:~$ cd
- student@infpc-205:~$ mkdir pafnucy
- mkdir: nie można utworzyć katalogu „pafnucy”: Plik istnieje
- student@infpc-205:~$ cd newrepo
- student@infpc-205:~/newrepo$ git status
- On branch master
- Initial commit
- nothing to commit (create/copy files and use "git add" to track)
- student@infpc-205:~/newrepo$ git add PLIK
- fatal: pathspec 'PLIK' did not match any files
- student@infpc-205:~/newrepo$ git status
- On branch master
- Initial commit
- nothing to commit (create/copy files and use "git add" to track)
- student@infpc-205:~/newrepo$ touch plik
- student@infpc-205:~/newrepo$ git status
- On branch master
- Initial commit
- Untracked files:
- (use "git add <file>..." to include in what will be committed)
- plik
- nothing added to commit but untracked files present (use "git add" to track)
- student@infpc-205:~/newrepo$ git add plik
- student@infpc-205:~/newrepo$ git status
- On branch master
- Initial commit
- Changes to be committed:
- (use "git rm --cached <file>..." to unstage)
- new file: plik
- student@infpc-205:~/newrepo$ git commit -m "stworzenie pliku"
- [master (root-commit) bd95757] stworzenie pliku
- 1 file changed, 0 insertions(+), 0 deletions(-)
- create mode 100644 plik
- student@infpc-205:~/newrepo$ touch plik1
- student@infpc-205:~/newrepo$ git status
- On branch master
- Untracked files:
- (use "git add <file>..." to include in what will be committed)
- plik1
- nothing added to commit but untracked files present (use "git add" to track)
- student@infpc-205:~/newrepo$ git add plik1
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- new file: plik1
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- new file: plik1
- student@infpc-205:~/newrepo$ emacs plik
- ** (emacs:1734): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
- student@infpc-205:~/newrepo$ touch drugi_plik
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- new file: plik1
- Changes not staged for commit:
- (use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
- modified: plik
- Untracked files:
- (use "git add <file>..." to include in what will be committed)
- drugi_plik
- student@infpc-205:~/newrepo$ git add drugi_plik
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- new file: drugi_plik
- new file: plik1
- Changes not staged for commit:
- (use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
- modified: plik
- student@infpc-205:~/newrepo$ git commit -m "zmiana i dodanie drugi_plik"
- [master 15d411d] zmiana i dodanie drugi_plik
- 2 files changed, 0 insertions(+), 0 deletions(-)
- create mode 100644 drugi_plik
- create mode 100644 plik1
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes not staged for commit:
- (use "git add <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
- modified: plik
- no changes added to commit (use "git add" and/or "git commit -a")
- student@infpc-205:~/newrepo$ touch trzeci
- student@infpc-205:~/newrepo$ touch czwarty
- student@infpc-205:~/newrepo$ git add trzeci czwarty
- student@infpc-205:~/newrepo$ touch trzeci
- student@infpc-205:~/newrepo$ touch czwarty
- student@infpc-205:~/newrepo$ gir add --all
- bash: gir: nie znaleziono polecenia
- student@infpc-205:~/newrepo$ git add --all
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- new file: czwarty
- modified: plik
- new file: trzeci
- student@infpc-205:~/newrepo$ ls
- drugi_plik plik plik1 trzeci
- student@infpc-205:~/newrepo$ rm trzeci
- student@infpc-205:~/newrepo$
- student@infpc-205:~/newrepo$ ls
- drugi_plik plik plik1
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- new file: czwarty
- modified: plik
- new file: trzeci
- Changes not staged for commit:
- (use "git add/rm <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
- deleted: czwarty
- deleted: trzeci
- student@infpc-205:~/newrepo$
- student@infpc-205:~/newrepo$ git rm czwarty
- rm 'czwarty'
- student@infpc-205:~/newrepo$ ls
- drugi_plik plik plik1
- student@infpc-205:~/newrepo$
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- modified: plik
- new file: trzeci
- Changes not staged for commit:
- (use "git add/rm <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
- deleted: trzeci
- student@infpc-205:~/newrepo$
- student@infpc-205:~/newrepo$ git commit -m 'a1'
- [master b095702] a1
- 2 files changed, 1 insertion(+)
- create mode 100644 trzeci
- student@infpc-205:~/newrepo$ git status
- On branch master
- Changes not staged for commit:
- (use "git add/rm <file>..." to update what will be committed)
- (use "git checkout -- <file>..." to discard changes in working directory)
- deleted: trzeci
- no changes added to commit (use "git add" and/or "git commit -a")
- student@infpc-205:~/newrepo$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement