Crossroadsman / ServerAdmin

Misc notes to self re server admin (Server-specific. General terminal/CLI notes should go to Shell and Command Line
Apache License 2.0
0 stars 0 forks source link

git: replace contents of master with contents from branch #12

Open Crossroadsman opened 5 years ago

Crossroadsman commented 5 years ago

We can merge a branch into master which will combine the history of master with the changes from the branch.

Is there a simple way to make the contents of the branch the contents of master (equivalent to deleting all the content from the working tree in master, committing an empty tree, then merging branch into master)?

Crossroadsman commented 5 years ago

See https://stackoverflow.com/a/2862938