SE_21_Lesson_2: VCS, Git

-> Installation of Git and setting SSH key

1. https://git-scm.com/downloads

2. open gitlab account

3. generate SSH key:

ssh-keygen -o -t rsa -C "emailaddress" 

4. gitlab -> preferences -> SSH Keys 


-> git add . veya git add * command

This command adds files from working directory to staging area

-> git commit -m "reasonable message"

This command adds files from staging area to local repository

-> git push 

This command adds files from local repository to remote repository

-> git pull

This command brings metadata, history and files

-> git fetch 

This command brings only metadata

-> vi file name - creates and opens file; cat file name - show content of file


-> Conflicts in git

<<<<<<< HEAD // our branch

Number one

=======

Git is cool

>>>>>>> master


-> git log

This command shows all commits with its commit hash


-> .gitignore file
This file ignores specific files to be tracked by git


-> git clean -fd

This command removes untracked files


-> git cherry-pick [commit hash]

This command merges specific commit to branch







Комментарии

Популярные сообщения из этого блога

Lesson1: JDK, JVM, JRE

SE_21_Lesson_11: Inheritance, Polymorphism

SE_21_Lesson_9: Initialization Blocks, Wrapper types, String class