Understanding Git Basics: Before exploring advanced Git commands, let's review some fundamental concepts
- Repository (Repo): A central location where project files and version history are stored.
- Commit: A snapshot of changes made to the codebase, accompanied by a descriptive message.
- Branch: A parallel version of the repository, facilitating independent development and experimentation.
- Merge: Combining changes from one branch into another, often the main branch.
- Clone: Creating a local copy of a remote repository on your machine.
- Pull: Fetching changes from a remote repository and integrating them into the local branch.
- Push: Sending local commits to a remote repository.
25 Essential and Advanced Commands Git
??. ?????? ????????: Installed Git to a directory and made some changes to a file, then told me to show file differences not yet staged.
??. ?????? ???????????? -?? -?? "???????????? ??????????????": Save all the tracked changes with a comment.
??. ?????? ????????????: Illustrate the state of the directory that you are currently in dynamically.
??. ?????? ?????? ????????_????????:Connect/close all the applications which are not required, and save changes made in files and add those file(s) to the staging area.
??. ?????? ???????????????? -?? ????????????_????????: Establish and fulfil the creation of a new branch.
??. ?????? ???????????????? ????????????_????????: Change to an actual branch of the company.
??. ?????? ???????????? --??????????:Amend the last commit, i.e. change it slightly.
??. ?????? ???????? ???????????? ????????????_????????: Force a branch to a remote.
??. ?????? ????????: To be used when synchronizing with a repository on the same machine or another machine in the network: Retrieve more changes and combine them.
????. ?????? ???????????? -??: Changes the entire base of the branch, and have the ability to alter prior commits.
????. ?????? ??????????: Clone a remote repo to make a copy on your own computer or in your local system.
领英推è
????. ?????? ??????????: All the branches should be integrated one to another.
????. ?????? ?????? --????????: use of commit logs with statistics.
????. ?????? ??????????: Modify some items to put them away for the future.
????. ?????? ?????????? ??????: Put on and take off stacked changes.
????. ?????? ???????? ????????????_????: Give information about a commit.
????. ?????? ?????????? ????????~??: Show how to revert to the state of the repository before the latest commit, while changes remain on your computer.
????. ?????? ????????????-?????????? -?? ????????????_????: Develop a patch file of a particular commit.
????. ?????? ?????????? ??????????_????????_????????: To incorporation changes made in a patch file.
????. ?????? ???????????? -?? ????????????_????????: Hurl a branch towards them with as much force as you could muster.
????. ?????? ??????????: Reversible by moving branch reference.
????. ?????? ????????????: Undo commits using create new commit.
????. ?????? ????????????-???????? ????????????_????: To apply the changes from a unique commit from any of the previously mentioned stages.
????. ?????? ????????????: Lists branches.
????. ?????? ?????????? --????????: Discards all changes to tracked files namely the index and the working tree to the last recorded commit.