This page is write in English

Means (For macOS terminal)

Terminal Command Means Function
cd change directory Change of directory in folder or directions.

<aside> 💡 The command “code” isn’t work in Windows?

</aside>

Commands

Git is actively searching any changes on folder and project, tose

Git Command Means Function or definition
git init Start git in the location where is execute
git status Check the actual Git status
git add Execute git add <archive_name> for add elements to queue.
Or execute git add . for add All elements to queue. This command add the files to Staged status
git commit Create a commit of new features and register code changes.
Insert git commit -m “<message or details>”
git config Set the config and personal data in git project.
Insert git config - -list for get the actual git config information
Insert git config - -list - -show -origin for view the file config location
git reset Remove files from staged status to unstaged status, you can use git reset <file> for remove specifically file
git branch Using git branch <branch_name> or git checkout -b <branch_name> can create a new branch with a custom name
git checkout Use git checkout <branch_name> for change between existing branches

<aside> 🚨 If at any time when updating the operating system we try to use git and we get the error: xcrun: **error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun We can open the console, go to whatever directory has git, and run the command: $** xcode-select --install This should reboot and reinstall the git development mode directors.

</aside>

This is a very common error after updating the macOS operating system, it detects that the terms of use of some development tools have changed or that it is necessary to reinstall them.

Tricks on Git

Delete all Git history and set on first Commit:

Change Commit Date:

LC_ALL=C GIT_COMMITTER_DATE="2023-05-09T14:10:07" git commit --amend --no-edit --date "2023-05-09T14:10:07"