Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you squash the last n commits into a single commit?



How do you squash the last n commits into a single commit?..

Answer / Dev Prakash

In Git, you can use the 'interactive rebase' command to squash multiple commits into one. First, navigate to your branch: `git checkout <your-branch>`. Then, start an interactive rebase with the latest commit that should be squashed: `git rebase -i HEAD~n`. This will open a text editor displaying a list of commits. Change 'pick' for the last n commits to 'squash', save and exit the editor. Git will then prompt you to enter a commit message for the combined commits.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DevOps Interview Questions

What are the advantages of test driven development?

1 Answers  


How does DevOps work?

1 Answers  


What are the anti-patterns of devops ?

1 Answers  


Explain the difference between continuous integration, delivery, and deployment ?

1 Answers  


What is devops engineer’s duty with regards to agile development?

1 Answers  


Explain the significance of the agile process in devops implementation.

1 Answers  


What types of testing are needed?

1 Answers  


Explain continuous monitoring.

1 Answers  


Explain how “infrastructure of code” is processed or executed in aws?

1 Answers  


List the major difference between the agile and devops?

1 Answers  


Mention some important features of memcached?

1 Answers  


What are the key elements of continuous testing?

1 Answers  


Categories