Hi All,
When working with Git in Visual Studio Code (VS Code) for our BC extensions, having a good grip on essential Git commands can streamline your development process.
Here's a concise list of the most useful Git commands:
Before making any commits, configure your Git identity:
- 
Set Username 
 git config --global user.name "Your Name"
- Set Email 
 git config --global user.email "you@example.com"
These credentials are used to tag your commits and authenticate with remote repositories.
- Initialize a new Git repository
 git init
- Clone a remote repository
 git clone
- View current changes and file states
 git status
- Commit staged changes
 git commit
 git commit -m "Your message"
- Fetch and merge from the remote
 git pull
 git pull origin main
- Push local commits to the remote
 git push
 git push origin main
- List or create branches
 git branch
 git branch or git branch new-feature
- Switch or create new branch
 git checkout
 git checkout branch-name or git checkout -b new-feature
- Merge a branch into your current one
 git merge
 git merge branch-name
- View commit history
 git log
 git log or git log --oneline
- Save changes temporarily without committing
 git stash
- Reapply the most recent stash
 git stash pop
- View list of all stashed changes
 git stash list
- Undo a specific commit safely by creating a new reversing commit
 git revert <commit-hash>
Do write to me in the comments if you know any other helpful commands!
Reach out to me if you have any questions or suggestions.
Check out other blogs, if you haven't already.
Kindly suggest what else you want me to blog about. Keep following and supporting!
You can also email me at jyotsnaoberainav@gmail.com
Also, visit my website JONAV if you are looking for NAV/D365BC Training and/or Services!
Thank you!
 
No comments:
Post a Comment