Artstation Github Mastodon Youtube

Necdet Yavaş

Git Notes

Github logingit remote set-url origin https://[email protected]/USERNAME/PROJECTNAME
Unstage a filegit reset FILENAMEThis will remove the file from the current index
without changing anything else. ("about to be committed" list)
Revert Uncommitted Changes
Revert everthinggit restore .
Revert specific filegit restore FILEPATH/FILENAME
Reverting an old pushed commit
git logGet SHA of the unwanted commit
git revert SHA
git push origin mainPush again
Exclude files from local repo
Open.git/info/exclude
AddfolderName/ (Excludes folder)
folderName/* (Excludes everything in that folder and its subdirectories)
Ignore files except a specific file inside a directory
Ignore everything under "directory"directory/*
But don't ignore "another_directory"!directory/another_directory
But ignore everything under "another_directory"directory/another_directory/*
But don't ignore "file_to_be_staged.txt"!directory/another_directory/file_to_be_staged.txt