0 votes
in Git by
Explain git stash drop?

1 Answer

0 votes
by

If at any point of time we want to remove a single stashed state from the stash list, we use the command 'git stash drop'(it will remove the latest from list i.e. stash@{0}) or 'git stash drop stash@{n}'; here stash@{n} must be a valid stash log reference as displayed in stash list command's output.

Explain the steps to work on any production issue in GIT

Let's go through the steps to understand flow in case we are working on any production issue :

Step 1: We will create a local branch for developing any feature /bug which will be a child branch inherited from the production branch. The below command will create headerissue branch locally on which developer would work and fix production issues.

git checkout -b headerissue production branch We can check the branches existing locally by running below command.

step 2:  git branch -List all branches existing locally You can progress the changes by running below command

step 3:  git status- To see any changes in the branch

step 4: Once you are done with changes committing changes locally not remotely.  Once unit testing and Release testing gets completed, you can move to merge the changes in the production branch.

step 5:  Now you can move to the production branch

$ git checkout productionbranch

Switched to branch productionbranch and merge the changes once

   $ git merge --no-ff headerissue (merging with issue branch)

   $ git branch -d headerissue(delete local branch)

   $ git push origin productionbranch (pushing issue fix in production branch)

Related questions

0 votes
asked Nov 27, 2019 by rajeshsharma
0 votes
0 votes
0 votes
asked May 21, 2020 in Git by SakshiSharma
...