Skip to content
Snippets Groups Projects
Commit 0fedbbf5 authored by Marina Popleteeva's avatar Marina Popleteeva
Browse files

Workflow, fork, clone, add folder, new branch, change, commit, push

parent 4cced25d
No related branches found
No related tags found
2 merge requests!134[release] Regular merge of develop,!122git part 2
Showing
with 57 additions and 13 deletions
# VS Code User Interface
Make text shorter
- **Activity Bar** - Located on the far left-hand side, this lets you switch between views and gives you additional context-specific indicators, like the number of outgoing changes when Git is enabled.
- **Side Bar** - Contains different views like the Explorer to assist you while working on your project.
- **Editor** - The main area to edit your files. You can open as many editors as you like side by side vertically and horizontally.
- **Panels** - You can display different panels below the editor region for output or debug information, errors and warnings, or an integrated terminal. Panel can also be moved to the right for more vertical space.
- **Status Bar** - Information about the opened project and the files you edit.
<div style="position:absolute;right:0%;top:10%">
<img src="slides/img/VSCodeGUI.png" height="750px">
</div>
Text and image from VS Code documentation
\ No newline at end of file
......@@ -3,7 +3,7 @@ You have a copy of repository on your laptop.
You can work on it now and use terminal to interact with Git or setup VS Code to simplify this interaction.
- Open VS Code
- Go to **File > Add Folder to Workspace**<br>
<img height="230px" src="slides/img/addFolder.png">
- Add your project folder
<img height="230px" src="slides/img/add-root-folder.png">
- Add your project folder<br>
<img height="230px" src="slides/img/addProject.png">
\ No newline at end of file
# Create new branch
To encapsulate your changes, isolate your work from other and help Git to easile merge virsions later, we work on branches.
- Click on branch symbol in side bat (bottom of VS Code window)<br>
<img height="100px" src="slides/img/branch.png">
- Choose "+ Create New Branch..."<br>
<img height="230px" src="slides/img/newBranch.png">
- Give the name to your new branch<br>
<img height="100px" src="slides/img/newBranchSwitched.png">
\ No newline at end of file
# Download your copy to your laptop - clone
Now you have your copy of the repository on server. YOu need to download it to your laptop.
Now you have your copy of the repository on server. You need to download it to your laptop.
In git words: you need you *clone your fork*:
- go to your projects (top left corner with LCSB logo)
- find **basic-practice-pages** project under your name and where you are the owner
- press *Clone* and then *Clone with SSH*. Part of the command will be in your clipboard now.<br>
- Go to your projects (top left corner with LCSB logo)
- Find **basic-practice-pages** project under your name and where you are the owner
- Press *Clone* and then *Clone with SSH*. URL will be in your clipboard now.<br>
<img height="230px" src="slides/img/clone.png">
- open terminal and navigate to your desired folder (use 'cd ..' and 'cd/')
- type ```git clone ssh-from-clipboad```<br>
<img height="230px" src="slides/img/clone-term.png">
- Open VS Code. If you haven't opened a folder yet, the VS Code view will show you a buttor to Clone Repository. Otherwise, go to View > Command Pallete and type "clone":<br>
<img height="230px" src="slides/img/firstrun-source-control.png">
- You will be asked for the URL of the remote repository (you have it in your clipboard now) and the place where to put files on your computer.
<img height="230px" src="slides/img/clone-SSH.png">
# Make changes and commit them
When you change file/s VS Code with remind you of unsaved changes (left image) and saved by not commited changes (rigth image):<br>
<img height="230px" src="slides/img/UnsavedChanges.png">
<img height="230px" src="slides/img/SavedButUncommitedChanges.png">
To commit your changes:
1. Go to Source Control in Activity Bar
2. Stage all changes you want to commit (press +)
3. Describe your changes in commit message
4. Commit your changes (press "tick")
<img height="230px" src="slides/img/commit.png">
\ No newline at end of file
......@@ -4,7 +4,11 @@ As you already know it is not nice to work on original repository.
You need to create a copy of the repository for yourself.
In git words: you need to *fork* repository.
<br><br>
Go to [https://gitlab.lcsb.uni.lu/R3/school/git/basic-practice-pages](https://gitlab.lcsb.uni.lu/R3/school/git/basic-practice-pages) and fork (make it private and select your namespace) <br>
In git words: you need to *fork* repository.<br><br>
Go to [https://gitlab.lcsb.uni.lu/R3/school/git/basic-practice-pages](https://gitlab.lcsb.uni.lu/R3/school/git/basic-practice-pages) and fork
- make it public or private depending on orginal repository)
- select your namespace
<img height="230px" src="slides/img/fork.png">
2022/2022-05-17_presentationTest/slides/img/SavedButUncommitedChanges.png

120 KiB

2022/2022-05-17_presentationTest/slides/img/UnsavedChanges.png

117 KiB

2022/2022-05-17_presentationTest/slides/img/VSCodeGUI.png

104 KiB

2022/2022-05-17_presentationTest/slides/img/add-root-folder.png

6.21 KiB

2022/2022-05-17_presentationTest/slides/img/addProject.png

146 KiB

2022/2022-05-17_presentationTest/slides/img/branch.png

21 KiB

2022/2022-05-17_presentationTest/slides/img/clone-SSH.png

34.8 KiB

2022/2022-05-17_presentationTest/slides/img/commit.png

110 KiB

2022/2022-05-17_presentationTest/slides/img/firstrun-source-control.png

11.9 KiB

2022/2022-05-17_presentationTest/slides/img/hero.png

38.3 KiB

2022/2022-05-17_presentationTest/slides/img/newBranch.png

124 KiB

2022/2022-05-17_presentationTest/slides/img/newBranchSwitched.png

20.6 KiB

2022/2022-05-17_presentationTest/slides/img/publish.png

90.2 KiB

2022/2022-05-17_presentationTest/slides/img/push.png

44.8 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment