Mohsin Rasool - IAM & IGA Consultant

  • Home
  • About
  • Testimonials
  • Genesis Framework for WordPress – What, Why & How
  • Contact

Powered by Genesis

GiT Guide & Basic Commands for Git Beginners

August 4, 2013 by Mohsin Rasool

I love to learn new concepts of programming and GiT has really inspiring stuff, so I learnt Git few months ago, and then i forgot. And today I wanted to do a little GiT stuff and I was unable to get it going… So I refreshed my memory of GiT commands and did my test repo at GitHub. For future reference I am going to list that git hacked list  below 🙂

GiT Setup: ========

git config –global user.name “Your Name Here”
git config –global user.email “your_email@example.com”

Make local dir and move to that
=========(not git command)
mkdir ~/Hello-World
#Creates a directory for your project called “Hello-World” in your user directory

cd ~/Hello-World
#go to that folder

Make repo
============
#create file from ccommand line with TOUCH
touch README.md

#initiate git first time in local dir for git to work
git init

#add files for committing
git add README.md

#commit message
git commit -m “first commit”

#add remote origin for repo
git remote add origin https://github.com/Ravian/dd.git

#push changes to remote master
git push -u origin master

Workflow
=======
given you are in the local repo dir
you have added remote origin repo
then workflow is like:

git status
git add filename
git commit -m “commit message”
git push -u origin master

Filed Under: Technology Tagged With: Git, github

Recent Posts

  • Launch Again if Needed
  • Testing Gutenberg Editor
  • My Favorite Quotes
  • Fix NodeJs Permissions Problem
  • Take Full Page Screenshot in FireFox with No Addons like a Boss
  • My Calculator is Now NodeJs instead of Google or Excel
  • Node.js Installing on Ubuntu 14.04 and also NPM
  • Associate Tags & Categories with Custom Post Type – CPT & Make them Work on Archive Pages
  • SASS & SCSS to Super Charge CSS Skills
  • Bluefish Editor – Text Editor for Programmers
  • An offline version of Khan Academy
  • Happy New Year 2014 & Falling Snow until 4th jan
  • WordPress 3.8 I love Admin Interface
  • German City Starts Distributing Free Ubuntu 12.04 CDs to Windows XP Users
  • FireFox Responsive Web Design View RWD
  • Keep Height of Second Div column same as First Div
  • Using PTCL & WordPress – Two Unusual Issues I Faced Today
  • Surprise – The Biggest Bonus So Far & Joy of Working
  • Toastmasters Club Lahore
  • Giving Access to Specific Bucket in AWS using IAM
  • GiT Guide & Basic Commands for Git Beginners
  • Added Good Looking Pricing Table to MagicBox Website
  • Thank You WordPress
  • Yes You Can Do It _Watch it Now
  • 2Checkout Coupon Promo Code Get Free 2Co Account
  • Top Ubuntu Free Softwares We Use Everyday in Our Internet Business
  • Market Samurai – Great Customer Support
  • Bobby McFerrin hacks your brain with music
  • Start up File Helps Your Startup Business
  • Simply Awesome – Reunion With Old Friend
  • Fire the Complex, Go for Simple
  • Facebook Profile Nice & Clean Personal URL
  • Forget about todo list, Manage Your Energy
  • Credit Card Interest Rate Puzzle & Banker’s Bomb
  • Seven Best Free Tools I Use Everyday in my Business
  • Google Wave – Best Tips & Tricks for Users
  • Paypal in Pakistan? Response to a Friend
  • Google Apps – Future Of Business Communication
  • Flippa for Flipping, Good as Sitepoint?
  • Fit Reports Launched again at Fit dot com
  • How a Website is Created Online Exactly – Part -1
  • 2Checkout Owner Alan Homewood Interviewed
  • Uploading Files Fast Quick Tip
  • How to Delete All Those Spam Comments
  • WordPress as CMS Pages RSS Feeds
  • MySQL-Front What a Great Tool
  • Google Chrome Browser Background Problem
  • Quick Fix for WordPress Duplicate Content
  • WordPress Blog Tips
  • No Paypal, No Clickbank, No Problem