sortly বলা যায় git ২ ধরনের repository ব্যবহার করে। local এবং global
এই পোস্ট এ আমরা কেবল সমস্ত কমান্ড দেখব, যা গিটহাবের সঙ্গে গিট এর কাজ করতে ব্যবহৃত হয়।
এই পোস্ট এ আমরা Git Bash ব্যবহার করব।
প্রথমতও আমাদের একটা directory প্রয়োজন যেখানে আমরা আমাদের file create করব এবং প্রয়োজনে github a repository বানায়ে upload দেব।
git bash open করি than ,
shell code mkdir এর পর পছন্দ মত directory এর নাম দিয়া folder তৈরী করি । mkdir FolderName
cd FolderName
git init
git config –global user.name “Name”
git config –global user.email “Mail@Name”
git config user.name “name”
git config user.email “email@name”
git config --list
touch fileNameWithExtention
git status
filename
git add fulfillName
git status
git add --all
git add .
git commit
Press button : I
Then: type something
Press button : Esc
press buttons: :x
last button : enter
git commit -m “type message”
git log
git log --online
যদি পূর্বে commit হয়েছে এমন file এ নতুন কোনো পরিবর্তণ করি তা হইলে আমাদের আবার ->onstage -> তারপর commit করতে হবে।
git add .
git commit -m "any message"
যদি আমরা update থেকে backdate file টিতে ফিরে যেতে চাই তবে আমাদের পূর্ববর্তী version এ ফিরে যেতে হবে, তারপরে আমাদের প্রথমে commit id এর মাধ্যমে আমাদের update টি দেখতে হবে।
git log --online
git checkout 658251
নতুন commit ব্যবহার করতে commit (ID) টি master branch এ নিতে হবে।
এখন আমরা আমাদের তৈরিকৃত সকল commit দেখতে পাবো master উল্লেখ এর মাধমে। git checkout master
git diff
আমরা commit ID ব্যবহার করে দুটি commit এর পার্থক্য দেখতে পারি। যেমনঃ (online ID = 1Fds546)নতুন commit পরিবর্তন করার আগেেই আমরা git diff এর দ্বারা চেক করি।
git show 03df531 1Fds546
git diff
git diff --staged
আমরা যদি কেবল folder থেকে কোন file delete করে ফেলি, তবে এই file টি স্থায়ীভাবে delete হয় না। এই ফাইলটি অন্যান্য commit এ থেকে যায় এবং ফিরে আনা যায় ।
যদি আমরা git থেকে delete করতে চাই , তা হইলে git bash এ command দিতে হবে Git rm filename.extention
কিন্তু অন্য stage এ আমাদের delete করা file দেখতে পাবো।এখন আমরা git এর local repository তে filename.extention দেখতে পাব না।
git status
আমাদের delete করা file git এ track করবে।
For remove permanently from stage, we need: -
git এর stage থেকে permanently file টি delete করে local repository থেকে এক বারে বাদ দিতে git command git reset HEAD filename.extention
Git commit -m “delete filename permanently”
Local Repository থেকে Remote Repository তে file
আমরা গিট এর একটা local version আমাদের directory তে .git file এ locate করে রেখেছি । এখন শুধু টা global repository তে upload দাওয়া বাঁকি ।
global repository শুধু ২ টা operation ঘটায় । git push এবং git fatch.global repository তে আমাদের file upload করার জন্য প্রথমে github.com এ login করতে হবে। তারপর github এ একটি repository তৈরি করতে হবে। repository টির ssh/https link টা দ্বারা আমরা আমাদের local repository টা কে github এর তৈরি repository এর সঙ্ঘে connect করব।
আমি ধরে নিতেছি আপনাদের github এ loging করে repository তৈরি করা হয়েছে। আপনারা github এ repository তৈরি করতে readme.md file টাই check-mark দিয়ে দিতে পারেন আবার readme.md file বাদ এ ও repository তৈরি করতে পারেন।
এখন আমাদের local repository এর directory তে গিয়ে git bash টি open করব ।
আমরা সব সময় git status দিয়ে check করব , file এ কোন update হয়েছে কি না। যদি update হয় তা হলে file list এ তা দেখা যাবে। update ঘটলে -> git add . -> git commit -m "new comment" ,মানে new change টাকে stage area -> local repository তে আনতে হবে।
এতক্ষণ সব পুরান প্যাঁচাল ছিল , এখন global repository তে file pass করি।
মনে করি আমাদের git bash এর path সঠিক , এখন git command git remote add origin [gitLink from HTTPS]। আমরা git clone করতে যে link use করি,এই টা একই link.
github এ loging এর জন্য popup window আসলে login complete করতা হবে। git remote add origin [gitLink from HTTPS]
git remote -v
সর্বশেষ এ brunch এ upload দিতে হবে। এখানে আমরা master বা root brunch এ upload দেব।
তাইgit push origin master এ master উল্লেখ করব। ভিন্ন brunch এর জন্য সেই brunch এর নাম উল্লেখ করতাম। </font>
git push origin master
আমরা একটা সহজ sortcut দেখে নেয়। আমরা basic work এ এই সব command use করছি। পর্যায়ক্রমে একটা project যে সব command এর দ্বারা github এ upload দাওয়া যায় তা :
cheet shit-
ls
-
cd project_directory
-
git init
-
git remote add origin [gitLink from HTTPS]
-
git remote -v
-
git add .
-
git commit -m “First commit”
-
git push origin master
git push origin master -f
আমাদের github এ file upload দাওয়াতো শেষ হল, এখন যদি github এ কোন update ঘটায় এবং তা যদি local repository তে আনতে চাই , বা local repository তেও একই আপডেট ঘটাতে চাই তা হইলে আমাদের ৩টা command use করতে হবে। </
আমাদের git bash এর path টা local repository এর directory এর path দিব তারপর- git pull origin master `
- git stash save “your comment”
- git stash drop
যদি প্রয়োজন হয় তা হলে আমরা আমাদের github এর পুর connection pc থেকে remove করে দিতে পারি। এর জন্য windows_search_bar এ গিয়ে credential লিখলে suggest এ
Credential Managerআসবে।
Credential Manager এ গিয়ে windows Credentials এ click করলে, নিচে অনেক path এর সঙ্ঘে git:<https://github.com> আসবে।
right side এর dropdown option এ click করলে Edit এবং Remove option পাওয়া যাবে । Remove এ click করে pc থেকে github এর connection পুরোপুরি remove করা যাবে।
আমরা git থেকে origin remove করতে পারি। git remote rm origin
git remote -v
git rm -r --cached <file>
git fetch --all
git pull --all
git branch -a
git branch -r
With inbuilt themes you can customize the look of the card without doing any manual customization.
or
## 1. GitHub Stats

## 2. Most Used Languages

## 3. Contributors Badge

## 4. Random Joke Generator

## 5. Profile View Counter

### Repository View Counter - HITS
