Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
course-material
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IT1901
course-material
Commits
57d85eeb
Commit
57d85eeb
authored
1 year ago
by
George Adrian Stoica
Browse files
Options
Downloads
Patches
Plain Diff
edit: update lecture 10 slides
parent
cec6bab5
No related branches found
No related tags found
No related merge requests found
Pipeline
#234421
passed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lectures/revealjs/10-git-branching.adoc
+102
-0
102 additions, 0 deletions
lectures/revealjs/10-git-branching.adoc
with
102 additions
and
0 deletions
lectures/revealjs/10-git-branching.adoc
0 → 100644
+
102
−
0
View file @
57d85eeb
= Git Branching
:customcss: slides.css
:icons: font
:includedir: includes/
:LECTURE_TOPIC: Git Branching
:LECTURE_NO: 10th Lecture
include::{includedir}header.adoc[]
[.smaller-80][.center-paragraph]
IT1901 Fall 2023 - {LECTURE_NO}
[background-color = "#124990"]
[color = "#fff6d5"]
== Git Branching
== Git Branching
- Using branches
- Managing conflicts
- Dealing with interruptions
- Summary
[.grid-left-right-50-50]
== Typical sequence (simple collaboration)
[.area-left]
- working with a shared project
** `git clone`
** `git pull`
[.area-right]
** `git status`
** `git add ...`
** `git commit ...`
** `git push`
== Possible improved workflow
- keep master only for finished work
- uses branches for development work
- when a feature branch is done it is merged into master
[.grid-left-right-50-50]
== Typical sequence (branches)
[.area-left]
** `git clone`
** `git pull`
** `git checkout -b <branch_name>`
[.area-right]
** `git status` + `git add ...` + `git commit ...`
** `git checkout master`
** `git merge <branch_name>`
** `git push`
[background-color = "#124990"]
[color = "#fff6d5"]
== Git Branching
== Conflicts (1)
** when same files (lines) are changed by different devs
** automatic merge is not possible
** we need to solve that to be able to push our changes
== Conflicts (2) - Setup VSCode
- `git config merge.tool vimdiff`
- `git config merge.conflictstyle diff3`
- `git config mergetool.prompt false`
== Conflicts (3) - Solving
- `git mergetool`
- `:wqa` save and exit from vi
- `git commit -m "message"`
- `git clean` remove file (might remove other untracked files)
[background-color = "#124990"]
[color = "#fff6d5"]
== Dealing with interruptions
== Git stash command
- put changes away temporarily
- https://git-scm.com/docs/git-stash
[background-color = "#124990"]
[color = "#fff6d5"]
== Summary
include::{includedir}footer.adoc[]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment