FOR BEGINNER GIT USAGE SOME USEFUL COMMANDS USING LINUX




WITH THE HELP OF GIT WE CAN VERY EASILY HANDLE OUR PROJECT AS WELL MAINTAIN IT VERSION CONTROL. SO HERE IS SOME USEFUL COMMANDS WHICH ARE VERY HELPFUL TO FOR US :
ONCE YOU COMPLETED YOUR WORK AFTER YOU SHOULD TRY THESE COMMANDS TO PUSH DATA ON THE SERVER.SO BACKUP WILL MAINTAIN ON THE SERVER OTHERWISE WE GET SOME PROBLEMS.

 WITH IN SIMPLE 10 STEPS YOU CAN COMMIT FILES

1) First Clone the remote repo into your local system with the help of this command.
git clone @:REPOPATH


2) How to check branch .Usually it will be *master by default.
git branch


3) How to check branch path
git branch -a | grep release


*4) Create and check out in another branch
 git checkout -b  


5) Check Status of your current branch
git status



6) How to add/modified and deleted file in current branch
 git add *


7) How to add/config user name and email
 git config -global user.name "sonydaman"
git config -global user.email "sonydaman@gmail.com"


8) How to commit your stage/index with message
git commit -a -m "YOUR BRANCH MESSAGE"

*9) How to push files on remote server
git push origin :

 10) Check Logs of all commits
git log


0 Comments