In git merge there are several ways to merge branches however, the most commonly used options are --ff-only
and --no-ff
. The --ff-only
option will resolve the merge as a fast-forward when possible. When not possible, it refuses to merge and will exit with a non-zero status. Best examples used by this options are branches from features and hotfixes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example.py | |
from jsonschema import FormatChecker | |
from .jsonschema_validator import get_validator | |
USER_SCHEMA = { | |
"$schema":"http://json-schema.org/draft-07/schema#", | |
"title":"User", | |
"type" : "object", | |
"properties" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def remove_duplicates_by_keys(arr, keys): | |
template = ":".join(["{{{}}}".format(key) for key in keys]) | |
return list({template.format(**el): el for el in arr}.values()) | |
data = [ | |
{ | |
"key1": "A", | |
"key2": "B" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import shutil | |
import os | |
# Get the current file's path and name | |
current_file_path = os.getenv('GEDIT_CURRENT_DOCUMENT_PATH') | |
current_file_name = os.path.basename(current_file_path) | |
# Set the destination directory and file extension |