Skip to content

Instantly share code, notes, and snippets.

View Alrassas's full-sized avatar

Mohammed Mahmoud Alrassas Alrassas

View GitHub Profile
@Alrassas
Alrassas / GitCommitBestPractices.md
Created September 5, 2023 14:51 — forked from luismts/GitCommitBestPractices.md
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@Alrassas
Alrassas / SHA256-Bridging-Header.h
Created March 21, 2022 18:21 — forked from hfossli/SHA256-Bridging-Header.h
AES 256 in swift 4 with CommonCrypto
#import <CommonCrypto/CommonCrypto.h>
@Alrassas
Alrassas / UserDefaultsAndStructArray.swift
Created June 2, 2019 09:55 — forked from enomoto/UserDefaultsAndStructArray.swift
save array of struct to UserDefaults
import Foundation
struct Book: Codable {
let title: String
let author: String
}
let KeyForUserDefaults = "myKey"
func save(_ books: [Book]) {