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 |
What are DevOps principles?
Mention what is the difference between memcache and memcached?
What are the advantages of nosql database over rdbms?
What is configuration management in terms of infrastructure and mention a few popular tools used?
What are the advantages of test driven development?
Explain continuous monitoring.
What is the difference between resource allocation and resource provisioning?
what is kubernetes?
Explain how you can update memcached when data changes?
Explain devops.
What is the role of aws in devops ?
What are DevOps skills?