SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
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/

Contenu connexe

Tendances

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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聖文 鄭
 

Similaire à 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
 

Dernier

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 

Dernier (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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...
 

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/