Skip to main content

How to create a new branch and works on that branch

In this git tutorial we will see how we can create branches in github, checkout the code in local and make changes also how to commit changes and push it to github

* How to create branch in git hub

* How to checkout specific branch in local system

* How to switch to different branches in local git using command prompt

* How to add changed files to git local repository

* How to commit code changes to local repository 

* How to push code changes from specific branch

* How to set upstream while pushing changes to github

Let's get started...

1. How to checkout code from specific branch

    git clone -b BranchName giturl

    if you want to create a new branch in your local use the below command

    -> How to create branch in local git

                git branch BranchName

    -> How to switch to other local branch
            
               git checkout BranchName

2. How to add new files in local git after checkout

    git add .

3. How to commit changes

    git commit -m "your_message"

4. How to push any branch to github

    git push --set-upstream origin BranchYouAreIn


Check out the below video for complete understanding



Comments

Popular posts from this blog

How to import project directly from git hub or bitbucket to eclipse or Spring tool suit (STS)

 In This tutorials we will see how we can directly import any repository or project from git hub or bitbucket to our IDE What we will learn in this tutorials ? 1. How to checkout repository from git hub or bitbucket to our IDE. 2. How to Import project from git hub repository to our eclipse or spring tool suit workspace. 3. How to create branch from java IDE like eclipse or Spring tool suit. 4. How to commit code from our IDE Thanks for watching

How to create new git branch from eclipse or Spring tool suit/STS

How to create new git branch from existing branch using IDE like eclipse, Spring tool suit, my eclipse. This process is also applicable other source code repositories like bitbucket  What you will learn in this tutorial ? 1. How to checkout code from git hub to any IDE ( eclipse, Spring tool suit, my eclipse ) 2. How to create branch using IDE 3. How to switch to a different branch using any IDE. 4. How to commit code changes and push the changes back to git hub or bit bucket Please check below details with hands on:- Thanks for watching this video hope you liked the video and cleared your understanding. How to create new git branch from eclipse How to create new git branch from Spring tool suit How to create new git branch from myeclipse How to create new git branch from any java IDE How to switch new git branch from eclipse How to switch new git branch from Spring tool suit How to switch new git branch from myeclipse How to switch new git branch from any java IDE How to import ...

How to debug any java application using eclipse, Spring tool suit, STS, Eclipse

In This tutorial we will see how to can debug any type of application in below mentioned IDEs Eclipse Spring tool suit STS Eclipse What you will learn in this tutorials ? 1. How to debug any java application. 2. How to debug restful webservice. 3. How to add break point. 4. How to step into and step in each step in java application while debug. 5. How to start using debugging. Please check the video mentioned below to have complete clarity and hands on. How to debug in eclipse, eclipse productivity, eclipse shortcuts, in28minutes tutorial, eclipse tutorial, pushpendra Gupta, eclipse java tutorial, java, eclipse tips, interview, eclipse tutorial for beginners, Karanam, Java , Eclipse , Debug , Java Code Debug , Source Code, How to add breakpoint in code, how to debug any java program, how to debug restful api, learn how to debug any code, how to debug any program in Spring tool suit, debug in STS

Find the length of string without using length method in java

In This tutorial we are going to see on of the tricky java coding question for fresher where they will be asked to write code to find length of any string without using any inbuild function or method. How to Find the length of string without using length method in java ? Lets see how we can do it  checkout the video mentioned below to understand each line of code, we will also debug the code and see what is happening in each line of code. Git repo:- https://github.com/pushpendragupta1993/DataStructureAndAlgorithms/blob/master/src/com/training/StringLength.java Find the length of string without using length method in java find length of string, learn java with me, find length of string how to find length of string in java. easiest way to learn coding easiest way to learn programming easiest way to understand Data structure easiest way to undestand algorithms easiest way to debug java easiest way to understand programs easiest way to understand java program easiest way to un...