Git IntelliJ Integration
In this page:
IntelliJ Git Integration
JetBrains IntelliJ IDEA में built-in Git integration है। जब आप एक Git project खोलते हैं, IntelliJ automatically changes index करता है, Project panel के अंदर modified files को blue में और untracked files को green में highlight करता है।
उदाहरण: IntelliJ Git Integration
# Open a Git project; IntelliJ highlights modified files in blue and untracked files in green
Commit और Push करना
files stage करने और messages लिखने के लिए Commit tool window (macOS पर Cmd+K, Windows पर Ctrl+K) इस्तेमाल करें। commits को अपने remote server पर भेजने के लिए Push dialog (Cmd+Shift+K या Ctrl+Shift+K) इस्तेमाल करें।
उदाहरण: Committing and Pushing
# Cmd+K (Ctrl+K) opens Commit; Cmd+Shift+K (Ctrl+Shift+K) opens Push
IntelliJ में Branches Manage करना
IntelliJ के status bar में branch indicator local और remote branches साथ list करने वाला एक popup खोलता है — वहाँ से आप एक checkout कर सकते हैं, अपनी current commit से एक नई बना सकते हैं, या terminal छुए बिना अपनी current में दूसरी branch merge कर सकते हैं।
उदाहरण: Managing Branches in IntelliJ
# Click the branch indicator in the status bar to checkout, create, or merge a branch
Local History देखना
IntelliJ में एक independent Local History safety net है। अगर आप commit करने से पहले code delete कर दें, file पर right-click करें और पिछली, unsaved file states आसानी से restore करने के लिए Local History select करें।
उदाहरण: Viewing Local History
# Right-click a file, select Local History, to restore a previous unsaved state
Visual Git Log
editor window के नीचे Git tab एक पूरा visual log display करता है। यह सारी branches, commit authors, hashes, और detailed file modification structures को एक clean interactive grid के अंदर list करता है।
उदाहरण: Visual Git Log
# Open the Git tab to see branches, authors, hashes, and file modifications in a grid
- Commit window में files को unchecked छोड़ना और फिर सोचना कि change commit से क्यों missing है।
- Commit and Push के बजाय Commit click करना और change के remote पर होने की उम्मीद करना।
.idea/folder को ignore करना, और.gitignoreमें belong करने वाली IDE settings commit करना।
Chapter Quiz — Complete all 8 topics to unlock
0/8 topics done
Complete these topics first: