Keep your project save with Git
Github & Bitbucket
 

#5

 

Frontend Workflow

 
By Raymon Schouwenaar
 

Frontend Workflow

 
By Raymon Schouwenaar
 

#5

 
After this video, you know how to use Git to...
  • To keep your new and excisting project save with Git
  • To set your project on Github
  • To set your project on Bitbucket
 

Frontend Workflow

 
By Raymon Schouwenaar
 
Before we start check
  1. Check if you installed Git
  2. Check if you have created an package.json file
If not check episode #1 of the Frontend Workflow.
 

#5

 

Frontend Workflow

 
By Raymon Schouwenaar
 
Setup Git in a new project
 

#5

 
Existing projects are also suitable for this workflow
 

Frontend Workflow

 
By Raymon Schouwenaar
 
We are gonna start with a simple command
 
$ git init
Run this command in your terminal
 

#5

 

Frontend Workflow

 
By Raymon Schouwenaar
 
The result should be something like
 
$ Initialized empty Git repository in 
    /Users/raymonschouwenaar/Development/Mr Frontend/git-new-project/.git/
Run this command in your terminal
 

#5

 

Frontend Workflow

 
By Raymon Schouwenaar
 
Let's create a CSS file
 
.container {
	max-width: 750px;
	margin: 0 auto;
}
Create this file inside a CSS folder and call it style.css
 

#5

 
By Raymon Schouwenaar
 

Frontend Workflow

 
Let's check our changes with Git
 
$ git status
Run this command in your terminal
 

#5

 
By Raymon Schouwenaar
 

Frontend Workflow

 
The result should be
 
$ On branch master

Initial commit

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	css/

nothing added to commit but untracked files present (use "git add" to track)

#5

 
By Raymon Schouwenaar
 

Frontend Workflow

 
The css folder is untracked
 

#5

 
Now the CSS folder should be added to Git.
 
$ git add css/
Run this command in your terminal
 
By Raymon Schouwenaar
 

Frontend Workflow

 
Check it with
 

#5

 
$ git status
Run this command in your terminal
 
By Raymon Schouwenaar
 

Frontend Workflow

 
The result should look something like
 

#5

 
$ On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

	new file:   css/style.css
Run this command in your terminal
 

Frontend Workflow

 
By Raymon Schouwenaar
 
Create a commit
 

#5

 

Frontend Workflow

 
By Raymon Schouwenaar
 

#5

 
A commit is
 
Is like creating a sort of bucket, where the changes can be in, with an attached description.

 

But it will also will be a point to go back to in the future.
 

Frontend Workflow

 
By Raymon Schouwenaar
 

#5

 
Create a commit
 
$ git commit -m "First initial commit"
Run this command in your terminal
 

Frontend Workflow

 
By Raymon Schouwenaar
 

#5

 
Check the status of the commit
 
$ git status
Run this command in your terminal
 

Frontend Workflow

 
By Raymon Schouwenaar
 

#5

 
The result should be something like
 
$ On branch master
nothing to commit, working directory clean
Run this command in your terminal
 

Frontend Workflow

 
By Raymon Schouwenaar
 
Push it to Github or Bitbucket
 

#5

 

Frontend Workflow

 
By Raymon Schouwenaar
 

#5

 
Add a remote git repository
 
$ git remote add origin https://github.com/mrfrontend-development/test-repo.git
Run this command in your terminal
 

Frontend Workflow

 
By Raymon Schouwenaar
 

#5

 
Or add a remote to bitbucket
 
$ git remote add bitbucket https://rsschouwenaar@bitbucket.org/mrfrontend/test-repo.git
Run this command in your terminal
 

Frontend Workflow

 
By Raymon Schouwenaar
 

#5

 
Push to your remote git repository
 
$ git push origin master
Run this command in your terminal
 
$ git push bitbucket master
Run this command in your terminal
 
By Raymon Schouwenaar
 
Thanks for watching the last video of this serie!
 
Made with Slides.com