Friday, October 27, 2017

What are git commands are essential for developer?[SOLVED]

Hey Guys,

I am Bikash Ranjan Nayak , if some one confusion in GIT command as a developer . I am  trying to explore you what are these command in git for regular wise required.

Before you use the git command in terminal just to confirm the configure for your user name and email address from IT team who have done it.
Note : it is one time required when you start first terminal for git.

1.Once you confirmed your user name and email which was create for git access user by IT team.

Command terminal will ask you the credentials like below
git config --global user.bikash "Bikash ranajn nayak"
git config --global
2.Clone live application from repository in your local
git clone git+ssh://bikash@

3.Created branches by IT team Like : Dev ,Stage,master(As live App) server.
  As a developer can checkout add,commit,push within the Dev barnch
 Lets start how developer can doing while developing.

Need to follow below step to push you updated code into dev branch.

Step 1 : Run command in terminal before you start work on you application
git checkout <Dev>
Step 2: Take update from dev branch using below command
git pull origin <Dev>
Step 3: Create your task related branch within dev branch
        git checkout -b <features/bikash_RequestNo_date>

Step 4: before you start work, please ensure in which branch you are in . run the below command to know which branch you are in , current branch will highlited as green.
git branch -a

Step 5: If you are in your branch then start your work now , after completed your updates in page or created add new file.

if you added new file then first run below command.
        git add .
Step 6: Now commit your branch in local
         git commit -am <"message write what you have done for understing">

Step 7: Now we need to upload our updated code into Dev server.
git checkout <Dev>
Step 8: please take update from dev , other resource which they have done
        git pull origin <dev>

Step 9 : Then mere your branch into dev which you have earlier you worked on
git merge --no-commit <features/bikash_RequestNo_date>
Step 10 :Now commit your update  on dev server
git commit -am <"message write what you have done for under sting">
Finally upload into dev server using below command
git push origin <dev>
Now come back to you branch or create new branch for new task

Hope you are achieved those git commands as developer end


1 comment: