Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Git & Gitlab

A small presentation on how to use git and reference to gitlab to handle your own private git repository
by

Alberto Lorente Leal

on 23 April 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Git & Gitlab

Getting Started
Master
Git
Feature Branches
bugfix branches
release branches
devtest
Git & GitLab
new site feature
angular js
Beginning of time
Speed
Created by linus torvalds
Simple design
Strong support for
non-linear development
Fully distributed
Git
VS
Snapshot
differences
What do you need?
Configure Git in your machine
Windows:
http://git-scm.com/download/win
Ubuntu/Mint:
apt-get install git
Configure Git user
Generate SSH Key for secure access.
Code to upload!
GitLab
Create a git repository online (i.e github/gitlab)
Go to your folder and initialize git
Commands:
"git init"
"git remote add origin https://longURL/ProjectName.git"
OR
"git remote add origin ssh://git@github.com/blabla.git"
OR
Clone from the repository in the server
Command:
"git clone ssh://git@github.com/project.git"
Basic Commands
"git pull"
"git status"
"git add"
"git commit -m meaningful message"
"git push localbranch remotebranch"
"git fetch"
Quite easy to remember
Branches:
Creating branches is easy
command:
git checkout -b name_branchname (create branch)
git checkout branchname (switch branch)

Example:
git checkout devtest
git checkout -b angular_feature
You can not switch with uncommited changes in the branch you work.
Commit:
Split controller.js, services.js, directives.js, etc...
Commit:
branch for new site feature
Commit:
Added features for new site
Commit:
angular js feature finished
Bug fix xxx.yy
Merge Bug fix
to devtest
Merge Request Angular feature into devtest
Commit:
Site finished
Merge Request New Site
planned release
Merges:
Run the command:
"git merge branchname"
This will merge a branch into the actual branch that you are working.
You should know what you really do when you run this, risk of merge conflicts
In our example:

Switch to devtest,

git checkout devtest
git merge angular_feature
delete branch*:

git branch -d angular_feature
delete remote*:
git push origin --delete angular_feature
Merge Conflicts:
Anything that can possibly go wrong, does.
Murphy's law
What can you do?
When a conflict happens, you need to manually solve it.
Do not worry, git will mark the conflicts in the files.
Fix the merge conflicts, add the modified files, commit and push to remote.
You can always cancel the merge.
Tags:
Tags allow easy reverts in history, similar to milestones
Command:
git tag -a 1402
More info on git:
Github help
Succesful branching model: http://nvie.com/posts/a-successful-git-branching-model/
Git book: http://git-scm.com/book
Lets play with the gitlab
Presentation by Alberto Lorente Leal
Full transcript