How To Install CVAT on Mac
I recently started learning about ML and detecting objects in pictures and videos. The first task you will have to do is image annotation before you …
I build a lot of experimental repos to support my tutorials, and I often find myself reusing code for other purpose. The problem is, these experimental repos can often come with a terribly messy git history… And so, before I try building on an old demo project, I like to clean up the git history
In a terminal, run the git log command to see the history of commits
|
|
A typical output look something like this:
|
|
Start the git rebase process with the oldest commit you want to modify (in our case 26af822 Add default config / pages from theme
):
|
|
An editor will be fired up with all the commits in your current branch (ignoring merge commits), which come after the given commit. You can reorder the commits in this list to your heart’s content, and you can remove them. The list looks more or less like this:
|
|
git-rebase will not look at the oneline descriptions (purely for your pleasure) but do not delete or edit the names (“26af822” and “289d5a8” in this example).
Enter INSERT mode by typing i
By replacing the command “pick” with the command “edit”, you can tell git-rebase to stop after applying that commit, so that you can edit the files and/or the commit message, amend the commit, and continue rebasing. If you want to fold two or more commits into one, replace the command “pick” with “squash” for the second and subsequent commit. If the commits had different authors, it will attribute the squashed commit to the author of the first commit.
to edit a commit, replace pick
by edit
to delete a commit, replace pick
by drop
to insert new commits, add a new line with the word break
Exit the INSERT mode by hitting the ESC
button on your keyboard
Save and exit the vim editor by typing: :wq
if you exit the editor with an error code, the rebase will be aborted. To exit with an error code on vim, do
:cq
now you are at the right commit. Make changes and add/stage those changes Then run
|
|
or if you just want to insert new commits:
|
|
After that, return back to the previous HEAD commit using:
|
|
WARNING: Note that this will change the SHA-1 of that commit as well as all children – in other words, this rewrites the history from that point forward.
Now we are going to force push changes to the repo (as we know what we are doing and are the only user of this repo)
|
|
I recently started learning about ML and detecting objects in pictures and videos. The first task you will have to do is image annotation before you …