Skip to content
November 27, 2026
  • Bluesky
  • Facebook
  • Linkedin
  • Mastodon
  • RSS
  • Twitter
  • Youtube

Daily CyberSecurity

Zero-hour alerts. Unmatched analysis.

Primary Menu
  • Home
  • ADVISORIES
    • All vendors
    • Microsoft
    • Cisco
    • Fortinet
    • Ivanti
    • Linux
    • Citrix
    • WordPress
    • Oracle
    • Google
    • Apple
    • VMware
    • Palo Alto Networks
    • Atlassian
    • Apache
    • Adobe
    • SAP
  • CVE Data
    • CVE Watchtower
    • Top Exploited CVEs
    • CVE Stats by Vendor
    • Q3 2026 Report
    • CVE Alerts
    • CVE Alert Settings
    • Pricing
  • Cyber Criminals
  • Data Leak
  • Free Security Tools
    • Base64 / URL Encoder & SHA Hash Generator
    • CVSS 3.1 Calculator & Vector Decoder
    • DNS Lookup Tool
    • IP Subnet Calculator & CIDR Reference
    • SSL Certificate Viewer & X.509 Decoder
    • Whois Lookup Tool
  • Malware
  • Vulnerability News
Light/Dark Button
  • Home
  • Technique
  • Some useful git commands
  • Technique

Some useful git commands

Do Son May 25, 2017 4 minutes read
git commands

In the case of project management with Git, there are some frequently encountered problems that are complicated to deal with. This article records some common commands and operations.

Modify the description of a submission

Sometimes we need to modify the description of the time before the submission of information, no operation can be done directly, but the use of rebasing command can be achieved.

For example, we want to modify the penultimate submission of the description information:

$ git rebase -i HEAD~3

Note: here HEAD ~ followed by 3 instead of 2, because here refers to the submission of the submitted parent to be modified.

And then will enter the text editing interface, as shown below

Will be modified to submit the previous pick to edit, save and exit.

This time to perform

$ git commit --amend

You can modify the description of the submission, modify and save and exit.

$ git rebase --continue

After the execution of this order, subsequent submissions will not change.

Note: Do not modify the commit that has been pushed to the remote repository! 

View, delete, rename remote branch

View all branches (including remote branches)

$ git branch -a

When a branch has been merged into the main branch, we usually delete the branch, if only git branch -d is to delete the local branch

To delete a remote branch, use the following command

$ git push origin --delete <branchName>

Renaming a branch is not very common, you can first delete the remote branch, and then rename the local branch, then rename the local branch pushed to the remote warehouse

$ git push --delete origin <branchName>

$ git branch -m <branchName> <newBranchName>

$ git push origin <newBranchName>

Merge multiple submissions

For example, to merge the last two submissions, in fact, and modify the information submitted a description of a bit similar.

$ git rebase -i HEAD~2

After the same will enter the text editing interface, the beginning of the second line of the pick to squash or s , save and exit.

At this time git will be submitted twice to merge and prompts you to enter the new submission information, save the exit after the successful completion of the merger of the two completed.

Force the remote repository back to the specified commit

When we develop some critical mistakes and make sure that the development work that is now done is meaningless, it may be necessary to roll back to the previous version.

$ git reset --hard <commit_id>

$ git push origin HEAD --force

In addition, the reset command has several optional parameters

  • Git reset – mixed: This is the default way, without any parameters git reset, instant this way, it back to a version, only to retain the source, return commit and index information.
  • Git reset – soft: roll back to a version, only back the commit information, will not return to the index file level. If you have to submit, you can directly commit.
  • Git reset-hard: completely back to a version, the local source will become the last version of the content.

Reset after reset-hard

Use git reset --hardafter, perhaps only to find it was a wrong action, then we want to revert to the previous version.

This time with git log is not seen before the submission of historical records.

You need $ git reflogto find the ID HEAD We need to restore, and then use the reset command to restore back.

View the contents of a specified file

For example, to see the contents of the test.cpp file submitted by f4869b0, the path to test.cpp needs to use the pathname relative to the git directory, using the following command:

$ git show f4869b0:test.cpp

The contents of the file will be displayed on the interface, you can use the file to redirect to another file, and then follow-up operation.

Tags: git git commands

🚨 Active Exploits in the Wild

  • CVE-2026-123007CVSS 9.2
    This issue affects NGINX Plus or NGINX Open Source configurations that use HTTP/2. When NGINX processes undisclosed traffic,...
    Admin intel📅 Updated: Nov 26, 2026
  • CVE-2026-129243CVSS 8.8
    A `service` parameter with a prefix, such as `service=x/WFS`, was resolved to the WFS service by the dispatcher,...
    Admin intel📅 Updated: Nov 26, 2026
  • CVE-2026-120705CVSS 8.6
    GeoServer exposes the built-in WFS 2.0 stored query `urn:ogc:def:query:OGC-WFS::GetFeatureById` through the public `GetFeature` operation. The stored query substituted...
    Admin intel📅 Updated: Nov 26, 2026
  • CVE-2026-136716
    Improper Check for Unusual or Exceptional Conditions vulnerability in Drupal Drupal core allows Forceful Browsing. This issue affects...
    Watchtower Verified📅 Updated: Nov 26, 2026
  • CVE-2026-133335CVSS 9.2
    Joomla Extension - virtuemart.net - Unauthenticated local file inclusion leading to remote code execution via controller fallback in...
    Watchtower Verified📅 Updated: Nov 25, 2026
  • CVE-2025-41450CVSS 8.2
    Improper Authentication vulnerability in Danfoss AKSM8xxA Series.This issue affects Danfoss AK-SM 8xxA Series prior to version 4.2
    CISA KEV📅 Added to KEV: Nov 25, 2026
  • CVE-2026-103406CVSS 9.8
    An Improper Neutralization of Special Elements used in an OS Command vulnerability in the AutomatedProvisioner in Juniper Networks...
    CISA KEV📅 Added to KEV: Nov 25, 2026
  • CVE-2026-133323CVSS 10.0
    A vulnerability in the Audio, Web, and Video Conferencing (AWV) component of Mitel MiCollab through 10.3 (10.3.0.18) could...
    CISA KEV📅 Added to KEV: Nov 25, 2026
Powered by CVE Watchtower

Search

CVE ALERTS
📈

EPSS Spike Alerts
Catch risk spikes before they make headlines.

🎯

Custom EPSS/CVSS
Set score thresholds to effectively filter noise.

🛡️

Exploit Intel
Real-world exploit signals beyond the KEV catalog.

🐙

GitHub Issues
Auto-create alert tickets without duplication.

📬

Weekly Digest
Clean summaries, eliminating email spam.

🏷️

Watchlist Groups
Tag vulnerabilities by team (Infra/AppSec/SOC).

🔀

Smart Routing
Route chat channels based on severity levels.

🚨

RBP Tracker
Early warning detection and tracking system.

Get free CVE alerts Pro from $7/mo

Critical Vulnerabilities

  • CVE-2026-137738CVSS 9.8
    In RealVNC Server before 7.19.1, UDP-based connections could potentially be exploited without authentication to execute code remotely or...
    📅 Updated: Nov 27, 2026
  • CVE-2026-137724CVSS 10.0
    A vulnerability in the Platform component of Mitel OpenScape 4000, and OpenScape 4000 Manager could allow an unauthenticated...
    📅 Updated: Nov 27, 2026
  • CVE-2026-137723CVSS 9.6
    A vulnerability in the Platform component of Mitel OpenScape 4000 and OpenScape 4000 Manager could allow an attacker...
    📅 Updated: Nov 27, 2026
  • CVE-2026-137721CVSS 10.0
    A vulnerability in the Platform component of Mitel OpenScape 4000 and OpenScape 4000 Manager could allow an attacker...
    📅 Updated: Nov 27, 2026
  • CVE-2026-137706CVSS 9.4
    Smart Portal developed by Direk Tech has a Missing Authorization vulnerability. Authenticated remote attackers can add a specified...
    📅 Updated: Nov 27, 2026
  • CVE-2026-115867CVSS 9.8
    The Database for Contact Form 7, WPforms, Elementor forms plugin for WordPress is vulnerable to Arbitrary File Upload...
    📅 Updated: Nov 27, 2026
  • CVE-2026-106125CVSS 9.8
    The Sneeit Framework plugin for WordPress is vulnerable to Remote Code Execution in versions up to, and including,...
    📅 Updated: Nov 27, 2026
  • CVE-2026-135384CVSS 9.2
    Improper authentication in OIDC bearer token verification in Canonical LXD before 5.0.12, 5.21.10, 6.10.2 allows a remote attacker...
    📅 Updated: Nov 26, 2026
Powered by CVE Watchtower

Daily CyberSecurity

  • About Daily CyberSecurity
  • Advertise with us
  • Submit Press Release
  • Announcement
  • Editorial Policy
  • Corrections Policy
  • Contact
  • Login
  • Disclaimer
  • DMCA
  • Privacy Policy

When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works

  • CVE Watchtower
  • CVE Statistics by Vendor 2026
  • Q3 2026 Report
  • Top Exploited CVEs
  • Bluesky
  • Facebook
  • Linkedin
  • Mastodon
  • RSS
  • Twitter
  • Youtube
© 2017 - 2026 Daily CyberSecurity. All Rights Reserved.