- Clone the git repository using :
git clone <git link>
- [or] use ssh method [google]
- [or] continue using the previously cloned repo
- Create a new branch for a new feature/update/bug using the naming convention below
- [or] Use already created branch
- [or] If branch is/was merged then deleted the merged branch and create a new one
- Make changes and add the changes to staging area using :
git add .
: add all filesgit add <file name>
: add file by file to make the commit more meaningful
- Commit the changes in the branch
git commit -m <message in quotes>
: commit with a message which describes the changes madegit commit -am <message in quotes>
: to add all files to staging and commit
-
Push the code to the remote repo :
git push -u origin <branch name>
-
Pull a request with the details of what changes has been made [this is done on github]
To create a branch : git checkout -b <branch name>
To check the status / see what changes are made / add files to the staging area
: git status
To check which branch you're currently on:
git status
- List of branches :
git branch --list
[yourname]_[feature/update/fix]_[page/component]
Example :
john-doe_feature_creating-navbar
john-doe_update_login-page
john-doe_fix_signup-form