Skip to content

Instantly share code, notes, and snippets.

@jinnabaalu
Created June 30, 2017 05:12
Show Gist options
  • Save jinnabaalu/cbb8f2082432e8ed0668123c6b90ca50 to your computer and use it in GitHub Desktop.
Save jinnabaalu/cbb8f2082432e8ed0668123c6b90ca50 to your computer and use it in GitHub Desktop.
To clone the repository
git clone <REPO_URL>
> git clone https://github.com/JinnaBalu/GitFlow.git
BY DEFAULT WE"LL BE IN MASTER BRANCH AS WE CLONE
After cloning it we get the same folder named repository
Modify or add file, which each developer do
check with git status to view the filse changed in local branch
> git status
We'll see the comments like below
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
How to stage the changes
> git add --all
This will add the files for commit and says below comments
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
How to commit the current changes
git commit -am "<COMMIT_MESSAGE>"
> git commit -am "initial commit"
All changes are commit to master local branch
ready to push to origin master brnach
How to push to master
> git push
It asks for credentials
check with git status
All files collited to origin and check with the github
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment