অনেকগুলো গিটহাব কমান্ড কিভাবে এক ক্লিকে ডিপ্লোয় করবেন?

 প্রথমে মেইন ব্রাঞ্চে একটি ফাইল ক্রিয়েট করবেন “deploy.sh” নামে এই ফাইলে আপনার সব কমান্ড লিখে ফেলবেন। নিচে কিছু এক্সামপল দেওয়া হলো #!/bin/bash # Switch to the main branch git checkout main #Add and commit the changes git add . git commit -m “Improve performance” # Push the main branch to the remote repository git push origin main # Switch to the gh-pages branch git checkout gh-pages # Remove all files from the gh-pages branch ...

January 12, 2025 · 1 min · Sayfullah Sayeb

কিভাবে স্টাটিক সাইট নতুন একটি ব্রাঞ্চে নিয়ে গিট-হাব পেইজে ডিপ্লোয় করবেন?

প্রথমে মেইন ব্রাঞ্চে আসবেন এবং কমিট ও পুশ করে নিবেন যেন কোন সমস্যা হলে রোলব্যাক করতে পারেন। git add . git commit -m “Improve performance” git push origin main একটি নতুন ব্রাঞ্চ খুলবেন অথবা যে ব্রাঞ্চে নিতে চাচ্ছেন সেটি চেকআউট করবেন git checkout –orphan gh-pages / git checkout gh-pages এই ব্রাঞ্চের সব ফাইল ফেলে দিবেন এবং যে ফোল্ডারটি নিতে চাচ্ছেন সেটি মেইন ব্রাঞ্চ থেকে চেকআউট করবেন git rm -rf . git checkout main -- src ...

January 12, 2025 · 1 min · Sayfullah Sayeb

যদি ভুলে কোন ব্রাঞ্চে পুশ হয়ে যায় তাহলে যেভাবে আগের ভার্সনে ব্যাক করবেন

প্রথমে, ভুলে পুশ করার আগের কমিট টা বের করতে হবে। git log ব্রাঞ্চ টি রিসেট করতে হবে সেই কমিটের সাথে git checkout main git reset –hard এর যায়গায় আপনি যে কমিট টি রিসেট করতে চাচ্ছেন তার হ্যাশটি দিতে হবে। এখন আপনি ফাইল মোডিফাই করতে পারেন অথবা ফোরসফুলি পুশ করতে পারেন git push origin main –force

January 12, 2025 · 1 min · Sayfullah Sayeb

একটা রিপো তে ব্রাঞ্চ ক্রিয়েট করে সেটা ফুল ক্লিন করে নতুন করে ফাইল এড

 প্রথমে একটা ব্লাঙ্ক ফোল্ডার নিয়ে সেটা ভিস কোড দিয়ে ওপেন করতে হবে। ট্রারমিনাল ওপেন করে git clone [https://github.com/ssayeb7/paste.git](https://github.com/ssayeb7/paste.git) ( যে রিপোতে ব্রাঞ্চ এড করতে চাই সেটা আগে ক্লোন করতে হবে।) cd paste git checkout -b new-branch-name যে নামে নতুন ব্রাঞ্চ হবে তার নাম git rm -r * নতুন ব্রাঞ্চ থেকে মেইন রিপোর সব ফাইল রিমুভ git commit -m "Delete all existing files" সব ফাইল রিমুভের মেসেজ git push origin new-branch-name নতুন ব্রাঞ্চের নাম ...

December 29, 2024 · 1 min · Sayfullah Sayeb

একটা রিপোর সকল ফাইল অন্য একটা রিপোর ব্রাঞ্চ হিসেবে নিয়ে আসা

git clone [https://github.com/ssayeb7/target-repo.git](https://github.com/ssayeb7/target-repo.git) cd target-repo যে রিপোর ব্রাঞ্চে অন্য রিপোর ফাইল এড হবে সে রিপোর লিঙ্ক git remote add source-repo [https://github.com/ssayeb7/source-repo.git](https://github.com/ssayeb7/source-repo.git) যে রিপো থেকে সোর্স ফাইল নিতে চাচ্ছি তার লিঙ্ক git fetch source-repo মেইন রিপোর ফাইলের সাথে সোর্স রিপোর ফাইল সিঙ্ক হবে git checkout -b new-branch-name source-repo/main নতুন ব্রাঞ্চের নাম দিতে হবে git push origin new-branch-name নতুন রিপোতে পুশ target-repo, source-repo, new-branch-name এগুলো চেইঞ্জ করে নিতে হবে।

December 29, 2024 · 1 min · Sayfullah Sayeb

Optimized command lineup for typical Git workflows used in every project

Set Up Git and Initialize Repository # Set your Git username and email git config --global user.name "Your Name" git config --global user.email "your_email@example.com" # Initialize a Git repository (if not already done) git init # Add all files to the staging area git add . # Commit the initial files git commit -m "Initial commit" # Add your GitHub repository as a remote git remote add origin https://github.com/<your-username>/<your-repo-name>.git # Push your code to the main branch git push -u origin main ...

December 8, 2024 · 3 min · Sayfullah Sayeb

Git and GitHub Documentation

Installation and Setup Download Git Visit Git Downloads and install Git on your system. Set Up Your Identity Configure your user name and email: git config --global user.name "Your Name" git config --global user.email "your_email@example.com" To configure these settings only for the current repository, omit the --global flag: git config user.name "Your Name" git config user.email "your_email@example.com" Check Current Configuration git config --global user.name git config --global user.email Repository Setup Initialize a Repository ...

December 8, 2024 · 3 min · Sayfullah Sayeb