—
Hey there! It’s your friendly noob friend Ariel here, sharing what little I’ve learned about Git and Bash commands. Today, I want to share a simple cheat sheet that I’ve created to help me remember some of the basic commands. I hope it helps you too!
First things first, let me give a shoutout to Carl Capozza for helping me get accustomed to using Git commands. He’s been an awesome mentor and has made learning so much easier for me. Thanks, Carl! 😊
Now, let’s dive into the cheat sheet. Here are some of the basic Git commands that you might find useful:
1. `git init`: This command initializes a new Git repository in your current directory. It creates a `.git` folder and sets up the basic structure for your repository.
2. `git add `: This command adds a file to the staging area. You can add multiple files by separating them with spaces.
3. `git commit -m “”`: This command creates a new commit with a specific message. The “ part is optional, but it’s a good practice to include a brief description of what you’ve changed.
4. `git log`: This command displays a list of all the commits in your repository, along with their authors, dates, and commit messages.
5. `git branch`: This command lists all the branches in your repository. You can use `git checkout ` to switch to a different branch.
6. `git merge `: This command merges the changes from another branch into your current branch.
7. `git remote add `: This command adds a remote repository to your Git installation. You can use this to fetch or push changes from a remote repository.
8. `git fetch`: This command fetches changes from a remote repository and merges them into your local repository.
9. `git push`: This command pushes your local commits to a remote repository.
10. `git pull`: This command pulls changes from a remote repository and merges them into your local repository.
That’s just a basic overview of some of the most common Git commands. Of course, there’s a lot more to learn, but I hope this cheat sheet helps you get started. If you have any questions or need further clarification, please don’t hesitate to ask! 😊
Oh, and before I forget, here are some quick Bash commands that you might find useful:
1. `cd`: This command changes your current directory.
2. `ls`: This command lists the files and directories in your current directory.
3. `mkdir `: This command creates a new directory.
4. `rm `: This command deletes a file or directory.
5. `cp `: This command copies a file to a different location.
6. `mv `: This command moves a file to a different location.
7. `echo `: This command prints text to the terminal.
8. `cat `: This command displays the contents of a file.
9. `man `: This command displays the manual for a specific command.
10. `which `: This command searches for a specific command in your system’s PATH environment variable.
That’s it for now! I hope you found this cheat sheet helpful. If you have any questions or need further clarification, please don’t hesitate to ask! 😊