Tags

Steps on creating a Pull request into the master branch

1. git checkout -b {branchName}
2. git commit -am ‘your message here’
3. git push origin {branchName}
Example:

# Create a local branch for your pull request
$ git checkout -b task/userlogin

# Then commit your local changes
$ git commit -am 'user login module(initial commit)'

# If everything is ok, then push it to the repo for Pull request
$ git push origin task/userlogin
Go to your https://github.com/sudogem/testapp101 there you'll find create new pull request

How to update your local branch

Solution A.

git fetch origin {branchName}
git rebase origin/{branchName}
Example:
$ git fetch origin task/userlogin
$ git rebase origin/task/userlogin

Solution B.

# Other ways it to use git pull to get all the latest updates.
$ git fetch origin task/userlogin
$ git status
On branch task/userlogin
Your branch is behind 'origin/task/userlogin' by 4 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
nothing to commit, working tree clean
# Since your branch is behind lets execute the command git pull
$ git pull 
remote: Counting objects: 71, done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 71 (delta 61), reused 53 (delta 43), pack-reused 0
Unpacking objects: 100% (71/71), done.
From github.com:sudogem/testapp101
   b909544..c2405e0  task/userlogin -> origin/task/userlogin
Updating b46b68b..638267b
Fast-forward
 docs/api/swagger.yaml                      | 2 +-
 README.md                                  | 2 +-
 models/login.js                            | 6 +++---

Advertisements