0

I have a directory, in that I've two different type of features: feature 1 and feature 2. and I'm working on feature 2 so I cloned from a commit from where feature 1 is like 50% completed.

Later, I started working on my feature branch and completed development. In this mean time feature 1 is also completed. Now I need to get that latest source of feature 1 to my branch.

So, using which techniques I can achieve this in git command? cherry-pick or rebase or any other commands?

James Z
  • 12,209
  • 10
  • 24
  • 44
imaheshwaran s
  • 167
  • 1
  • 11

2 Answers2

1

I wanted latest source of feature 1 , so I performed following,

git checkout feature1
git pull
git checkout feature 2
git merge feature1

By doing above git commands i'm able to get latest of feature 1.

imaheshwaran s
  • 167
  • 1
  • 11
0

you can perform a rebase to get the code, on your feature branch do a

git pull --rebase origin <branch name>

(assuming the remote is with name origin here)

Pankaj Saini
  • 1,493
  • 8
  • 13