Last active
May 6, 2018 19:48
-
-
Save shrikanthkr/a9118107bc32fd032c26c84ec4e659cc to your computer and use it in GitHub Desktop.
simple git commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>ReadMe<h2> | |
<h4>General Git Commands</h4> | |
https://www.git-tower.com/blog/git-cheat-sheet/ | |
> git clone `<project-url>` | |
> | |
> git checkout `<branch-name>` -- to checkout a branch | |
> | |
> git checkout -b `<branch-name>` -- to create a branch> | |
> | |
> git pull origin `<branch-name>` -- pull from a specified branch | |
<h4>Steps to commit a change</h4> | |
>git add -A -- adds all the files | |
> | |
>git commit -m 'My commit message' | |
> | |
>git push origin `<branch_name>` | |
Note: <b>Do not force push at any instance <b> | |
<h4>Rails Commands</h4> | |
>rails s - start the server | |
> | |
>rails g controller `<controller_name>` -- should be in plural like `rails g controller users` | |
> | |
>rails g model `model_name` -- should be singular |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment