🔹git init
This will create .git repository in your project
🔹git add .
If you want to add everything from the project folder to the staging area
🔹git status
Shows what has already been added to the staging area and what files have been changed that need to be added to the staging area.
🔹 git commit -m "Description"
Takes the files from your staging area and commits them your local repository. In quotes try to describe the commit in brief details
🔹git branch <branch-name>
It will create a new branch
🔹git checkout <branch name>
This command is used for switching the branch
🔹git push origin <branch-name>
This will push the local repository to your remote repository.
🔹git clone <repo-url>
If you don't have your project on the computer this will allow you to clone the project into the directory you are working.
🔹git diff
It shows the difference between your current branch and another branch you are merging into
🔹git pull <remote> <branchname>
If you are working on the same codebase with other people, this command will allow you to pull the latest version from the remote repository and update your local version
🔹git merge
It lets you take the independent lines of development created by git branch and integrate them into a single branch.
🔹git log
It gives you information about the commit history for the repository
🔹git revert <unwanted commit hash>
Create new commit that undoes all of the changes made in<commit>, then apply it to the current branch.
🔹git reset <file>
Remove <file> from the staging area, but leave the working directory unchanged. This unstaged a file without overwriting any changes.
🔹git clean -n
Shows which files would be removed from the working directory. Use the -f flag in place of the -n flag to execute the clean.
Enjoyed the thread🧐
I'm sure you did✅
Now don't forget to follow @Vinaystwt to get more Developer Resources and threads
Also, Turn that Notifications icon on so that you will not miss it next time when I upload something Really amazing posts🤯
• • •
Missing some Tweet in this thread? You can try to
force a refresh
🔹Codingame: CodinGame is a challenge-based training platform for programmers where you can improve your coding skills with fun exercises codingame.com
🔹Screeps: Screeps is a fun game and has a unique angle to it. Using actual programming instead of a pseudo-language actually allows the players to focus on better coding screeps.com