SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
The shortest guide about…
Configuring a local repository and
push to a remote repository…

Wilson Govindji
wg@wilsongovindji.net

V 1.0 – 2014/01
Let’s Git started
What will you not learn from here?
• What Git is;
• How to install Git;
• How to be Git Ninja;
So… what’s the point??
• Sometimes learning Git can be overwhelming, there
are so many details and too much to learn about…
well it’s true…
• So, i will show you the foundation steps to create a
local repository and push it to a remote repository…
nothing more… nothing less
What do we need to get start?
• Download and install Git;
– http://git-scm.com/

• Create a GitHub account;
– https://github.com/
Step #1- Create local repository
• Create a folder;
• Execute “git init”;
– Well done!! Now myproject folder is a git repository.

• A hidden folder named ”.git” was created which contains this
particular repository settings, no need to worry about that for
now;
Step #2- Create a file
• Create a new file i.e.: echo “Hello Git” > hello.txt;
• Execute “git status”;
– This command shows the working tree status;
– And currently hello.txt is untracked;
Hold your horses!!
• Previously you’ve seen that hello.txt
is untracked, what does that mean??
It means it isn’t in none of the
stages identified below;
• In Git you haves three stages where
your files can reside in:
– Committed – means data is safely stored
in your local git database;
– Modified – means a file is modified and
hasn’t been commited yet;
– Staged – means a modified file is marked
to go in the next commit;

• With Git you can say exactly what
you want to commit from your
working directory to database;
Step #3- Staging file
• Let’s add hello.txt to staging area by running “git add * ”
• Execute “git status”;
– This command will show that hello.txt is ready to be commited;

• From now on, git is tracking hello.txt file;
• By now you’ve understood that with git you can choose WHAT
you want to commit to git repository database by adding from
working directory to staging area;
Step #4- Let’s COMMIT
• Execute “git commit –m <Message>”;
– This command will let you record changes to the repository
and associate a message to this commit;

• Execute “git status”;
– Now it shows that there is nothing to be commited;

• Execute “git log”;
– This command shows commits log;

Commits
log
Step #5- Create remote repository
• Go to your GitHub account;
• Click over
to
create a new repository;
• Give a name to the repository,
fill the description field, select
the visibility of your
repository;
• Click
• Next, copy the given url of the
new brand remote repository;
– You will need it for the next step;
Step #6- Configure remote
repository on git
• Now is time to add the remote repository location on your local
git repository;
– Execute “git remote add <nameToRemoteRepository> <gitRepositoryURL>”;

• See config file executing “cat config ”;
– You will see a section named “remote” that points to the remote repository
Step #7- Pushing to remote
repository
• We are almost there, time to push!! Push!! Push to GitHub!!
– Execute “git push –u <nameToRemoteRepository> master”;
– Next time only need to type “git push”;

• Insert username and password as requested;
– Objects will be uploaded to remote repository;
Step #8- Verify remote
repository
• Go to your github repository and check that the file commited
on local repository is there;
Step #9- Learn more
• Now it’s time for you to learn more about git;
• Online documentation;
– http://git-scm.com/doc
– https://help.github.com/

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git basics
Git basicsGit basics
Git basics
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Git and github
Git and githubGit and github
Git and github
 
B4usolution git git-hub
B4usolution git git-hubB4usolution git git-hub
B4usolution git git-hub
 
Learning git
Learning gitLearning git
Learning git
 
Git learning
Git learningGit learning
Git learning
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Github - Le Wagon Melbourne
Github - Le Wagon MelbourneGithub - Le Wagon Melbourne
Github - Le Wagon Melbourne
 
Git basics
Git basicsGit basics
Git basics
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Introduction to Git (part 1)
Introduction to Git (part 1)Introduction to Git (part 1)
Introduction to Git (part 1)
 
Git basic
Git basicGit basic
Git basic
 
Gitgithub101slideshare 150922131830-lva1-app6891
Gitgithub101slideshare 150922131830-lva1-app6891Gitgithub101slideshare 150922131830-lva1-app6891
Gitgithub101slideshare 150922131830-lva1-app6891
 
Git introduction workshop for scientists
Git introduction workshop for scientists Git introduction workshop for scientists
Git introduction workshop for scientists
 
Git & Github Workshop - Le Wagon Melbourne
Git & Github Workshop - Le Wagon MelbourneGit & Github Workshop - Le Wagon Melbourne
Git & Github Workshop - Le Wagon Melbourne
 
Git 101
Git 101Git 101
Git 101
 
Git real slides
Git real slidesGit real slides
Git real slides
 

Andere mochten auch

Distributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialDistributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialTed Naleid
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
Team Foundation Server Version Control
Team Foundation Server Version ControlTeam Foundation Server Version Control
Team Foundation Server Version ControlSteve Lange
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & GitCraig Smith
 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?Leonid Mamchenkov
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVNPHPBelgium
 
Advanced Git
Advanced GitAdvanced Git
Advanced Gitsegv
 
Revisionare, tracciare, collaborare. Version control con git
Revisionare, tracciare, collaborare. Version control con gitRevisionare, tracciare, collaborare. Version control con git
Revisionare, tracciare, collaborare. Version control con gitFabio Alessandrelli
 

Andere mochten auch (11)

Distributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialDistributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With Mercurial
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
3 Git
3 Git3 Git
3 Git
 
Team Foundation Server Version Control
Team Foundation Server Version ControlTeam Foundation Server Version Control
Team Foundation Server Version Control
 
Version control
Version controlVersion control
Version control
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
 
Revisionare, tracciare, collaborare. Version control con git
Revisionare, tracciare, collaborare. Version control con gitRevisionare, tracciare, collaborare. Version control con git
Revisionare, tracciare, collaborare. Version control con git
 
Git
GitGit
Git
 

Ähnlich wie How to configure a Git repository and push to a remote repository…

Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
Beginner's guide to git and github
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github SahilSonar4
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubKim Moir
 
Basic Git commands
Basic Git commandsBasic Git commands
Basic Git commandsJitendra Zaa
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7Chris Caple
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of GitDivineOmega
 
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfBruceLee275640
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git聖文 鄭
 

Ähnlich wie How to configure a Git repository and push to a remote repository… (20)

Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
Beginner's guide to git and github
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Basic Git commands
Basic Git commandsBasic Git commands
Basic Git commands
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Github basics
Github basicsGithub basics
Github basics
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
 
Git-r-Done
Git-r-DoneGit-r-Done
Git-r-Done
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 
Getting with GIT
Getting with GITGetting with GIT
Getting with GIT
 
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
 
Git tips and tricks
Git   tips and tricksGit   tips and tricks
Git tips and tricks
 
Demo
DemoDemo
Demo
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
 

Kürzlich hochgeladen

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

How to configure a Git repository and push to a remote repository…

  • 1. The shortest guide about… Configuring a local repository and push to a remote repository… Wilson Govindji wg@wilsongovindji.net V 1.0 – 2014/01
  • 2. Let’s Git started What will you not learn from here? • What Git is; • How to install Git; • How to be Git Ninja; So… what’s the point?? • Sometimes learning Git can be overwhelming, there are so many details and too much to learn about… well it’s true… • So, i will show you the foundation steps to create a local repository and push it to a remote repository… nothing more… nothing less
  • 3. What do we need to get start? • Download and install Git; – http://git-scm.com/ • Create a GitHub account; – https://github.com/
  • 4. Step #1- Create local repository • Create a folder; • Execute “git init”; – Well done!! Now myproject folder is a git repository. • A hidden folder named ”.git” was created which contains this particular repository settings, no need to worry about that for now;
  • 5. Step #2- Create a file • Create a new file i.e.: echo “Hello Git” > hello.txt; • Execute “git status”; – This command shows the working tree status; – And currently hello.txt is untracked;
  • 6. Hold your horses!! • Previously you’ve seen that hello.txt is untracked, what does that mean?? It means it isn’t in none of the stages identified below; • In Git you haves three stages where your files can reside in: – Committed – means data is safely stored in your local git database; – Modified – means a file is modified and hasn’t been commited yet; – Staged – means a modified file is marked to go in the next commit; • With Git you can say exactly what you want to commit from your working directory to database;
  • 7. Step #3- Staging file • Let’s add hello.txt to staging area by running “git add * ” • Execute “git status”; – This command will show that hello.txt is ready to be commited; • From now on, git is tracking hello.txt file; • By now you’ve understood that with git you can choose WHAT you want to commit to git repository database by adding from working directory to staging area;
  • 8. Step #4- Let’s COMMIT • Execute “git commit –m <Message>”; – This command will let you record changes to the repository and associate a message to this commit; • Execute “git status”; – Now it shows that there is nothing to be commited; • Execute “git log”; – This command shows commits log; Commits log
  • 9. Step #5- Create remote repository • Go to your GitHub account; • Click over to create a new repository; • Give a name to the repository, fill the description field, select the visibility of your repository; • Click • Next, copy the given url of the new brand remote repository; – You will need it for the next step;
  • 10. Step #6- Configure remote repository on git • Now is time to add the remote repository location on your local git repository; – Execute “git remote add <nameToRemoteRepository> <gitRepositoryURL>”; • See config file executing “cat config ”; – You will see a section named “remote” that points to the remote repository
  • 11. Step #7- Pushing to remote repository • We are almost there, time to push!! Push!! Push to GitHub!! – Execute “git push –u <nameToRemoteRepository> master”; – Next time only need to type “git push”; • Insert username and password as requested; – Objects will be uploaded to remote repository;
  • 12. Step #8- Verify remote repository • Go to your github repository and check that the file commited on local repository is there;
  • 13. Step #9- Learn more • Now it’s time for you to learn more about git; • Online documentation; – http://git-scm.com/doc – https://help.github.com/