What is GitLab ???

A web-based Git repository manager with wiki and issue tracking features, using an open source license, developed by GitLab Inc

CONTENTS

setup

create a new repositary

checkout a repository

add & commit

pushing changes

branching

update & merge

log

replace local changes

References

Setup

  • Download git for Windows

Create a new repository

  • create a new directory : cd <file path>
  • Register at https://gitlab.com/users/sign_in
  • open it and perform a

Checkout a repository

git clone /path/to/repository

git init

Add & commit

git add <filename>

git commit -m "Commit message"

  • Add file contents to the index
  • Record changes to the repository
  •  Clone a repository into a new directory

git add *

Pushing changes

Branching

git push origin <branch>

git checkout -b <newbranchname>

git checkout master

  1. create a new branch

2.  switch back to master

3.  delete the branch again

git branch -d <newbranchname>

master

newbranch

branch

merge

  • Update remote refs along with associated objects
  • Specifying -b causes a new branch to be created

Update 

git pull

git fetch

  • Fetch from and integrate with another repository or a local branch
  • Download objects and refs from another repository

Merge 

git merge <branch>

  • Join two or more development histories together
  • before merging changes, you can also preview them by using

git diff <source_branch> <target_branch>

Log 

git log

git log --name-status

  • Show commit logs
  • See only which files have changed

Replace local changes

git checkout -- <filename>

git fetch origin

  •  To drop all the local changes and commits, fetch the latest history from the server and point the local master branch at it like this

git reset --hard origin/master

REFERENCES

-THE END-

THANK YOU :)

Made with Slides.com